fixed download long youtube videos

This commit is contained in:
Denis Utkin 2025-01-14 19:50:35 +01:00
parent 1bc68f8f2b
commit ded172733a
3 changed files with 5 additions and 5 deletions

View file

@ -32,7 +32,7 @@
"dotenv": "^16.0.1",
"express": "^4.21.2",
"express-rate-limit": "^7.4.1",
"ffmpeg-static": "^5.1.0",
"ffmpeg-static": "^5.2.0",
"hls-parser": "^0.10.7",
"ipaddr.js": "2.2.0",
"nanoid": "^5.0.9",

View file

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

View file

@ -35,7 +35,7 @@ importers:
specifier: ^7.4.1
version: 7.4.1(express@4.21.2)
ffmpeg-static:
specifier: ^5.1.0
specifier: ^5.2.0
version: 5.2.0
hls-parser:
specifier: ^0.10.7