From ca05eab0c38042fa28f526947870edd6659fd208 Mon Sep 17 00:00:00 2001 From: LostMyCode <63048878+LostMyCode@users.noreply.github.com> Date: Thu, 16 Oct 2025 20:03:38 +0900 Subject: [PATCH] fix(FormatUtils#download): Add missing await for format.decipher() call in download function The format.decipher() method returns a Promise, 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. --- src/utils/FormatUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/FormatUtils.ts b/src/utils/FormatUtils.ts index c45b15fc..08b9ec3a 100644 --- a/src/utils/FormatUtils.ts +++ b/src/utils/FormatUtils.ts @@ -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) {