api/youtube: fix error when downloading stuff from WEB

This commit is contained in:
jj 2025-01-20 12:37:36 +00:00
parent ef687750b4
commit 0378a1ae15
No known key found for this signature in database

View file

@ -491,12 +491,12 @@ export default async function (o) {
filenameAttributes.resolution = `${video.width}x${video.height}`;
filenameAttributes.extension = codecList[codec].container;
video = video.url;
audio = audio.url;
if (innertubeClient === "WEB" && innertube) {
video = video.decipher(innertube.session.player);
audio = audio.decipher(innertube.session.player);
} else {
video = video.url;
audio = audio.url;
}
}