fixup! fix: bruteforce the way until it gets player 7795af42
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 1m0s

This commit is contained in:
Fijxu 2025-02-21 00:51:16 -03:00
parent 980c420d8d
commit d35ce630ba
Signed by: Fijxu
GPG key ID: 32C1DDF333EDA6A4

View file

@ -3,6 +3,7 @@ import { routes } from "./routes/index.ts";
import { Innertube, UniversalCache } from "youtubei.js";
import { poTokenGenerate } from "./lib/jobs/potoken.ts";
import { konfigLoader } from "./lib/helpers/konfigLoader.ts";
import Player from "https://raw.githubusercontent.com/LuanRT/YouTube.js/refs/tags/v13.0.0-deno/deno/src/core/Player.ts";
let getFetchClientLocation = "getFetchClient";
if (Deno.env.get("GET_FETCH_CLIENT_LOCATION")) {
if (Deno.env.has("DENO_COMPILED")) {
@ -90,6 +91,21 @@ if (!innertubeClientOauthEnabled) {
konfigStore,
innertubeClientCache,
);
console.log(
`[DEBUG] player_id: ${innertubeClient.session.player?.player_id}`,
);
while (
innertubeClient.session.player?.player_id != "7795af42"
) {
innertubeClient = await poTokenGenerate(
innertubeClient,
konfigStore,
innertubeClientCache as UniversalCache,
);
console.log(
`[DEBUG] player_id: ${innertubeClient.session.player?.player_id}`,
);
}
} else {
innertubeClient = await Innertube.create({
cache: innertubeClientCache,