fix(FormatUtils#download): Add missing await for format.decipher() call in download function

The format.decipher() method returns a Promise<string>, but was being called without await. This could cause the format_url variable to be a Promise object instead of the expected URL string, leading to errors in subsequent fetch operations.
This commit is contained in:
LostMyCode
2025-10-16 20:03:38 +09:00
committed by GitHub
parent 9b74ec59c8
commit ca05eab0c3

View File

@@ -31,7 +31,7 @@ export async function download(
};
const format = chooseFormat(opts, streaming_data);
const format_url = format.decipher(player);
const format_url = await format.decipher(player);
// If we're not downloading the video in chunks, we just use fetch once.
if (opts.type === 'video+audio' && !options.range) {