From 976aa17c29f4f1fc1578cf1e4ead6b2da50a3c6f Mon Sep 17 00:00:00 2001 From: murdle Date: Wed, 25 Feb 2026 04:08:06 +0200 Subject: [PATCH] change device category and type --- src/api/video.ts | 4 +++- src/lib/innertube.ts | 2 -- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/api/video.ts b/src/api/video.ts index e68574c..7e0b46d 100644 --- a/src/api/video.ts +++ b/src/api/video.ts @@ -30,12 +30,14 @@ video.get( let currentPage = 1; - while (currentPage <= page && searchQuery.has_continuation) { + while (currentPage <= page) { const videos = searchQuery.results.filter( (node): node is YTNodes.Video => node.type === "Video" ); allVideos.push(...videos); + + if (!searchQuery.has_continuation) break; if (currentPage === page) break; searchQuery = await searchQuery.getContinuation(); diff --git a/src/lib/innertube.ts b/src/lib/innertube.ts index 42e3533..f543d3f 100644 --- a/src/lib/innertube.ts +++ b/src/lib/innertube.ts @@ -15,9 +15,7 @@ Platform.shim.eval = async ( const innertube = await Innertube.create({ cache: new UniversalCache(true, "./cache"), - device_category: "mobile", enable_session_cache: true, - client_type: ClientType.WEB, ...(config.COOKIES ? { cookie: config.COOKIES } : {}) });