cleanup: fix deepsource warnings

This commit is contained in:
hyperdefined 2024-07-26 18:18:52 -04:00
parent 2439be868f
commit 30949eda00
No known key found for this signature in database
GPG Key ID: EB0B55B31E88AB03

View File

@ -18,7 +18,7 @@ async function video(obj) {
json = JSON.parse(req);
} catch { return { error: 'ErrorEmptyDownload' }; }
const highestQuality = Object.keys(json.sources)[0];
const video = json.sources[highestQuality][0].src;
const videoSrc = json.sources[highestQuality][0].src;
if (!json.sources[highestQuality][0].type.includes('mp4')) {
return { error: 'ErrorCouldntFetch' };
}
@ -29,7 +29,7 @@ async function video(obj) {
}
return {
urls: video,
urls: videoSrc,
filenameAttributes: {
service: "newgrounds",
id: obj.id,
@ -81,7 +81,7 @@ async function music(obj) {
}
}
export default async function(obj) {
export default function(obj) {
// handle video downloads
if (obj.type == 'portal') {
return video(obj);