mirror of
https://github.com/imputnet/cobalt.git
synced 2025-07-18 19:28:29 +00:00
fix suggestions by @ihatespawn
This commit is contained in:
parent
250cbcfac1
commit
49ba560304
@ -4,7 +4,7 @@ import { cleanString } from "../../sub/utils.js";
|
|||||||
export default async function(obj) {
|
export default async function(obj) {
|
||||||
// handle video downloads
|
// handle video downloads
|
||||||
if (obj.type == 'portal') {
|
if (obj.type == 'portal') {
|
||||||
let req = await fetch(`https://www.newgrounds.com/${obj.type}/video/${obj.id}`, {
|
let req = await fetch(`https://www.newgrounds.com/portal/video/${obj.id}`, {
|
||||||
headers: {
|
headers: {
|
||||||
'User-Agent': genericUserAgent,
|
'User-Agent': genericUserAgent,
|
||||||
'X-Requested-With': 'XMLHttpRequest',
|
'X-Requested-With': 'XMLHttpRequest',
|
||||||
@ -72,15 +72,15 @@ export default async function(obj) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
urls: url,
|
urls: url,
|
||||||
filenameAttributes: {
|
filenameAttributes: {
|
||||||
service: "newgrounds",
|
service: "newgrounds",
|
||||||
id: obj.id,
|
id: obj.id,
|
||||||
title: fileMetadata.title,
|
title: fileMetadata.title,
|
||||||
author: fileMetadata.artist,
|
author: fileMetadata.artist,
|
||||||
},
|
},
|
||||||
fileMetadata,
|
fileMetadata,
|
||||||
isAudioOnly: true
|
isAudioOnly: true
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
@ -60,5 +60,5 @@ export const testers = {
|
|||||||
patternMatch.id?.length <= 11,
|
patternMatch.id?.length <= 11,
|
||||||
|
|
||||||
"newgrounds": (patternMatch) =>
|
"newgrounds": (patternMatch) =>
|
||||||
patternMatch.id?.length <= 6,
|
patternMatch.id?.length <= 1,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user