mirror of
https://github.com/imputnet/cobalt.git
synced 2024-12-29 11:06:10 +00:00
soundcloud: use startsWith instead of substring
This commit is contained in:
parent
c6f1184e55
commit
40b00a9676
|
@ -75,7 +75,7 @@ export default async function(obj) {
|
|||
let fileUrlBase = selectedStream.url;
|
||||
let fileUrl = `${fileUrlBase}${fileUrlBase.includes("?") ? "&" : "?"}client_id=${clientId}&track_authorization=${json.track_authorization}`;
|
||||
|
||||
if (fileUrl.substring(0, 54) !== "https://api-v2.soundcloud.com/media/soundcloud:tracks:")
|
||||
if (!fileUrl.startsWith("https://api-v2.soundcloud.com/media/soundcloud:tracks:"))
|
||||
return { error: 'ErrorEmptyDownload' };
|
||||
|
||||
if (json.duration > env.durationLimit * 1000)
|
||||
|
|
Loading…
Reference in a new issue