api/soundcloud: return isHLS flag when appropriate
Some checks are pending
CodeQL / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Waiting to run
Run service tests / test service functionality (push) Waiting to run
Run service tests / test service: ${{ matrix.service }} (push) Blocked by required conditions
Run tests / check lockfile correctness (push) Waiting to run
Run tests / web sanity check (push) Waiting to run
Run tests / api sanity check (push) Waiting to run

This commit is contained in:
jj 2025-05-29 17:08:09 +00:00
parent a52dde7654
commit ed18008493
No known key found for this signature in database

View File

@ -108,7 +108,7 @@ export default async function(obj) {
fileUrl.searchParams.set("track_authorization", json.track_authorization);
const file = await fetch(fileUrl)
.then(async r => (await r.json()).url)
.then(async r => new URL((await r.json()).url))
.catch(() => {});
if (!file) return { error: "fetch.empty" };
@ -119,13 +119,14 @@ export default async function(obj) {
}
return {
urls: file,
urls: file.toString(),
filenameAttributes: {
service: "soundcloud",
id: json.id,
...fileMetadata
},
bestAudio,
fileMetadata
fileMetadata,
isHLS: file.pathname.endsWith('.m3u8'),
}
}