update patches
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 1m19s
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 1m19s
This commit is contained in:
parent
9abed96033
commit
cc12d7a1b5
13 changed files with 111 additions and 33 deletions
|
@ -1,19 +1,19 @@
|
||||||
From c83645ec3e6d0a53ab20f0eb9e0b16e11f6d2fed Mon Sep 17 00:00:00 2001
|
From 304a11d7dbb5ea7b2a0a0807b72b7a8fd412fe45 Mon Sep 17 00:00:00 2001
|
||||||
From: Fijxu <fijxu@nadeko.net>
|
From: Fijxu <fijxu@nadeko.net>
|
||||||
Date: Mon, 24 Mar 2025 19:37:34 -0300
|
Date: Mon, 24 Mar 2025 19:37:34 -0300
|
||||||
Subject: [PATCH 01/13] ci: update deno to 2.2.5
|
Subject: [PATCH 01/13] ci: update deno to 2.2.9
|
||||||
|
|
||||||
---
|
---
|
||||||
Dockerfile | 2 +-
|
Dockerfile | 2 +-
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/Dockerfile b/Dockerfile
|
diff --git a/Dockerfile b/Dockerfile
|
||||||
index 04b74c0..0f9f933 100644
|
index 04b74c0..0d45468 100644
|
||||||
--- a/Dockerfile
|
--- a/Dockerfile
|
||||||
+++ b/Dockerfile
|
+++ b/Dockerfile
|
||||||
@@ -1,4 +1,4 @@
|
@@ -1,4 +1,4 @@
|
||||||
-FROM denoland/deno:debian-2.1.4 AS builder
|
-FROM denoland/deno:debian-2.1.4 AS builder
|
||||||
+FROM denoland/deno:debian-2.2.5 AS builder
|
+FROM denoland/deno:debian-2.2.9 AS builder
|
||||||
|
|
||||||
ARG TINI_VERSION=0.19.0
|
ARG TINI_VERSION=0.19.0
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From c87979c26380ed00e9894396a3d15d6c0d7059e4 Mon Sep 17 00:00:00 2001
|
From 7cb6f3aef050b13290bd2184f26727d15b8b1399 Mon Sep 17 00:00:00 2001
|
||||||
From: Fijxu <fijxu@nadeko.net>
|
From: Fijxu <fijxu@nadeko.net>
|
||||||
Date: Mon, 24 Mar 2025 18:44:10 -0300
|
Date: Mon, 24 Mar 2025 18:44:10 -0300
|
||||||
Subject: [PATCH 02/13] feat: add support for an external videoplayback proxy
|
Subject: [PATCH 02/13] feat: add support for an external videoplayback proxy
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From 69060577293547a049f37e8319661d139bc0d8e0 Mon Sep 17 00:00:00 2001
|
From 6bf25c88d4201ae64b8995999f68f5d8041068d8 Mon Sep 17 00:00:00 2001
|
||||||
From: Fijxu <fijxu@nadeko.net>
|
From: Fijxu <fijxu@nadeko.net>
|
||||||
Date: Mon, 24 Mar 2025 18:52:53 -0300
|
Date: Mon, 24 Mar 2025 18:52:53 -0300
|
||||||
Subject: [PATCH 03/13] feat: report the external videoplayback proxy via /info
|
Subject: [PATCH 03/13] feat: report the external videoplayback proxy via /info
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From 84db2add0f0c4e3ab299d999e85966029f8d3c53 Mon Sep 17 00:00:00 2001
|
From 78e38dca6a6aa534a82f9baca9a6bdeb13c463b3 Mon Sep 17 00:00:00 2001
|
||||||
From: Fijxu <fijxu@nadeko.net>
|
From: Fijxu <fijxu@nadeko.net>
|
||||||
Date: Mon, 24 Mar 2025 19:02:01 -0300
|
Date: Mon, 24 Mar 2025 19:02:01 -0300
|
||||||
Subject: [PATCH 04/13] feat: add resolution limit on DASH streams to save
|
Subject: [PATCH 04/13] feat: add resolution limit on DASH streams to save
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From bba074b050e57a1c59e97a966568eb98de192606 Mon Sep 17 00:00:00 2001
|
From ccbac1fa1a5e2d003e8781f1a40ce2c8921e750b Mon Sep 17 00:00:00 2001
|
||||||
From: Fijxu <fijxu@nadeko.net>
|
From: Fijxu <fijxu@nadeko.net>
|
||||||
Date: Mon, 24 Mar 2025 19:06:04 -0300
|
Date: Mon, 24 Mar 2025 19:06:04 -0300
|
||||||
Subject: [PATCH 05/13] feat: add env variable to set verify_requests
|
Subject: [PATCH 05/13] feat: add env variable to set verify_requests
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From e2828064cea085c5994080cf73e162a62f86403f Mon Sep 17 00:00:00 2001
|
From 118a43eb29e5c0d177f24b397b6cea03d1f9f81f Mon Sep 17 00:00:00 2001
|
||||||
From: Fijxu <fijxu@nadeko.net>
|
From: Fijxu <fijxu@nadeko.net>
|
||||||
Date: Mon, 24 Mar 2025 19:20:52 -0300
|
Date: Mon, 24 Mar 2025 19:20:52 -0300
|
||||||
Subject: [PATCH 06/13] feat: add support for multiple proxies
|
Subject: [PATCH 06/13] feat: add support for multiple proxies
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
From 96220305843a6fbfb99387b0adcc1a7e5d2a3d6f Mon Sep 17 00:00:00 2001
|
From 366732c6fec10c7efe360e208974352b93078850 Mon Sep 17 00:00:00 2001
|
||||||
From: Fijxu <fijxu@nadeko.net>
|
From: Fijxu <fijxu@nadeko.net>
|
||||||
Date: Mon, 24 Mar 2025 20:34:33 -0300
|
Date: Mon, 24 Mar 2025 20:34:33 -0300
|
||||||
Subject: [PATCH 07/13] feat: add option to disable potoken generation check
|
Subject: [PATCH 07/13] feat: add option to disable potoken generation check
|
||||||
|
|
||||||
---
|
---
|
||||||
config/config.example.toml | 1 +
|
config/config.example.toml | 1 +
|
||||||
src/lib/helpers/config.ts | 9 +++++++++
|
src/lib/helpers/config.ts | 9 +++++
|
||||||
src/lib/jobs/potoken.ts | 4 +++-
|
src/lib/jobs/potoken.ts | 80 ++++++++++++++++++++------------------
|
||||||
3 files changed, 13 insertions(+), 1 deletion(-)
|
3 files changed, 52 insertions(+), 38 deletions(-)
|
||||||
|
|
||||||
diff --git a/config/config.example.toml b/config/config.example.toml
|
diff --git a/config/config.example.toml b/config/config.example.toml
|
||||||
index 8e2af1c..b1cb4ee 100644
|
index 8e2af1c..b1cb4ee 100644
|
||||||
|
@ -42,20 +42,98 @@ index cd0489d..6004753 100644
|
||||||
}).strict().default({}),
|
}).strict().default({}),
|
||||||
youtube_session: z.object({
|
youtube_session: z.object({
|
||||||
diff --git a/src/lib/jobs/potoken.ts b/src/lib/jobs/potoken.ts
|
diff --git a/src/lib/jobs/potoken.ts b/src/lib/jobs/potoken.ts
|
||||||
index c2b9441..b8be39b 100644
|
index c2b9441..9fd4101 100644
|
||||||
--- a/src/lib/jobs/potoken.ts
|
--- a/src/lib/jobs/potoken.ts
|
||||||
+++ b/src/lib/jobs/potoken.ts
|
+++ b/src/lib/jobs/potoken.ts
|
||||||
@@ -177,7 +177,9 @@ async function checkToken({
|
@@ -145,46 +145,50 @@ async function checkToken({
|
||||||
"failed to find valid video with adaptive format to check token against",
|
}) {
|
||||||
);
|
const fetchImpl = getFetchClient(config);
|
||||||
}
|
|
||||||
|
- try {
|
||||||
|
- const feed = await instantiatedInnertubeClient.getTrending();
|
||||||
|
- // get all videos and shuffle them randomly to avoid using the same trending video over and over
|
||||||
|
- const videos = feed.videos
|
||||||
|
- .filter((video) => video.type === "Video")
|
||||||
|
- .map((value) => ({ value, sort: Math.random() }))
|
||||||
|
- .sort((a, b) => a.sort - b.sort)
|
||||||
|
- .map(({ value }) => value);
|
||||||
|
-
|
||||||
|
- const video = videos.find((video) => "id" in video);
|
||||||
|
- if (!video) {
|
||||||
|
- throw new Error("no videos with id found in trending");
|
||||||
|
- }
|
||||||
|
+ if (config.jobs.youtube_session.po_token_check) {
|
||||||
|
+ try {
|
||||||
|
+ const feed = await instantiatedInnertubeClient.getTrending();
|
||||||
|
+ // get all videos and shuffle them randomly to avoid using the same trending video over and over
|
||||||
|
+ const videos = feed.videos
|
||||||
|
+ .filter((video) => video.type === "Video")
|
||||||
|
+ .map((value) => ({ value, sort: Math.random() }))
|
||||||
|
+ .sort((a, b) => a.sort - b.sort)
|
||||||
|
+ .map(({ value }) => value);
|
||||||
|
+
|
||||||
|
+ const video = videos.find((video) => "id" in video);
|
||||||
|
+ if (!video) {
|
||||||
|
+ throw new Error("no videos with id found in trending");
|
||||||
|
+ }
|
||||||
|
|
||||||
|
- const youtubePlayerResponseJson = await youtubePlayerParsing({
|
||||||
|
- innertubeClient: instantiatedInnertubeClient,
|
||||||
|
- videoId: video.id,
|
||||||
|
- config,
|
||||||
|
- tokenMinter: integrityTokenBasedMinter,
|
||||||
|
- metrics,
|
||||||
|
- overrideCache: true,
|
||||||
|
- });
|
||||||
|
- const videoInfo = youtubeVideoInfo(
|
||||||
|
- instantiatedInnertubeClient,
|
||||||
|
- youtubePlayerResponseJson,
|
||||||
|
- );
|
||||||
|
- const validFormat = videoInfo.streaming_data?.adaptive_formats[0];
|
||||||
|
- if (!validFormat) {
|
||||||
|
- throw new Error(
|
||||||
|
- "failed to find valid video with adaptive format to check token against",
|
||||||
|
- );
|
||||||
|
- }
|
||||||
- const result = await fetchImpl(validFormat?.url, { method: "HEAD" });
|
- const result = await fetchImpl(validFormat?.url, { method: "HEAD" });
|
||||||
|
- if (result.status !== 200) {
|
||||||
|
- throw new Error(
|
||||||
|
- `did not get a 200 when checking video, got ${result.status} instead`,
|
||||||
|
+ const youtubePlayerResponseJson = await youtubePlayerParsing({
|
||||||
|
+ innertubeClient: instantiatedInnertubeClient,
|
||||||
|
+ videoId: video.id,
|
||||||
|
+ config,
|
||||||
|
+ tokenMinter: integrityTokenBasedMinter,
|
||||||
|
+ metrics,
|
||||||
|
+ overrideCache: true,
|
||||||
|
+ });
|
||||||
|
+ const videoInfo = youtubeVideoInfo(
|
||||||
|
+ instantiatedInnertubeClient,
|
||||||
|
+ youtubePlayerResponseJson,
|
||||||
|
);
|
||||||
|
+ const validFormat = videoInfo.streaming_data?.adaptive_formats[0];
|
||||||
|
+ if (!validFormat) {
|
||||||
|
+ throw new Error(
|
||||||
|
+ "failed to find valid video with adaptive format to check token against",
|
||||||
|
+ );
|
||||||
|
+ }
|
||||||
+ const result = await fetchImpl(validFormat?.url, {
|
+ const result = await fetchImpl(validFormat?.url, {
|
||||||
+ method: "HEAD",
|
+ method: "HEAD",
|
||||||
+ });
|
+ });
|
||||||
if (result.status !== 200) {
|
+ if (result.status !== 200) {
|
||||||
throw new Error(
|
+ throw new Error(
|
||||||
`did not get a 200 when checking video, got ${result.status} instead`,
|
+ `did not get a 200 when checking video, got ${result.status} instead`,
|
||||||
|
+ );
|
||||||
|
+ }
|
||||||
|
+ } catch (err) {
|
||||||
|
+ console.log("Failed to get valid PO token, will retry", { err });
|
||||||
|
+ throw err;
|
||||||
|
}
|
||||||
|
- } catch (err) {
|
||||||
|
- console.log("Failed to get valid PO token, will retry", { err });
|
||||||
|
- throw err;
|
||||||
|
}
|
||||||
|
}
|
||||||
--
|
--
|
||||||
2.49.0
|
2.49.0
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From 8440076ee1af7a3088938a9e481afbaede9b5750 Mon Sep 17 00:00:00 2001
|
From 14316bc947ac4445465fd8a71bdca3dee2eebb37 Mon Sep 17 00:00:00 2001
|
||||||
From: Fijxu <fijxu@nadeko.net>
|
From: Fijxu <fijxu@nadeko.net>
|
||||||
Date: Tue, 25 Mar 2025 00:04:47 -0300
|
Date: Tue, 25 Mar 2025 00:04:47 -0300
|
||||||
Subject: [PATCH 08/13] add proxy retries on innertube error
|
Subject: [PATCH 08/13] add proxy retries on innertube error
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From 79ef8ba531499997aea3e74415a2e8c315080e59 Mon Sep 17 00:00:00 2001
|
From 8abaf38caf956720e39c32425c69452472cffecc Mon Sep 17 00:00:00 2001
|
||||||
From: Fijxu <fijxu@nadeko.net>
|
From: Fijxu <fijxu@nadeko.net>
|
||||||
Date: Tue, 25 Mar 2025 00:07:28 -0300
|
Date: Tue, 25 Mar 2025 00:07:28 -0300
|
||||||
Subject: [PATCH 09/13] add metrics for proxy retries
|
Subject: [PATCH 09/13] add metrics for proxy retries
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From 34010c0db0dbbd9f0831eb44ed22ff728e7fe0e1 Mon Sep 17 00:00:00 2001
|
From e4b515fe5b7819b5e1e210f5648e7163ea7236cc Mon Sep 17 00:00:00 2001
|
||||||
From: Fijxu <fijxu@nadeko.net>
|
From: Fijxu <fijxu@nadeko.net>
|
||||||
Date: Tue, 25 Mar 2025 00:24:07 -0300
|
Date: Tue, 25 Mar 2025 00:24:07 -0300
|
||||||
Subject: [PATCH 10/13] fix: fix tokio overflow on compile
|
Subject: [PATCH 10/13] fix: fix tokio overflow on compile
|
||||||
|
@ -8,11 +8,11 @@ Subject: [PATCH 10/13] fix: fix tokio overflow on compile
|
||||||
1 file changed, 2 insertions(+)
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
diff --git a/Dockerfile b/Dockerfile
|
diff --git a/Dockerfile b/Dockerfile
|
||||||
index 0f9f933..99fce38 100644
|
index 0d45468..370678d 100644
|
||||||
--- a/Dockerfile
|
--- a/Dockerfile
|
||||||
+++ b/Dockerfile
|
+++ b/Dockerfile
|
||||||
@@ -1,5 +1,7 @@
|
@@ -1,5 +1,7 @@
|
||||||
FROM denoland/deno:debian-2.2.5 AS builder
|
FROM denoland/deno:debian-2.2.9 AS builder
|
||||||
|
|
||||||
+ENV RUST_MIN_STACK=9999999999
|
+ENV RUST_MIN_STACK=9999999999
|
||||||
+
|
+
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From 9bfe190249affbdb92ecfa7bb575a2948682f836 Mon Sep 17 00:00:00 2001
|
From f700501126aeb9517e679055e7f6b8e626455fa7 Mon Sep 17 00:00:00 2001
|
||||||
From: Fijxu <fijxu@nadeko.net>
|
From: Fijxu <fijxu@nadeko.net>
|
||||||
Date: Wed, 26 Mar 2025 12:24:49 -0300
|
Date: Wed, 26 Mar 2025 12:24:49 -0300
|
||||||
Subject: [PATCH 11/13] Add environment variable for youtube_session.frequency
|
Subject: [PATCH 11/13] Add environment variable for youtube_session.frequency
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From 0916b71023628157a597339e4a0481c5dec1315d Mon Sep 17 00:00:00 2001
|
From 32afd34c9d071c36e9ebcdb3fd637b2041e879df Mon Sep 17 00:00:00 2001
|
||||||
From: Fijxu <fijxu@nadeko.net>
|
From: Fijxu <fijxu@nadeko.net>
|
||||||
Date: Tue, 8 Apr 2025 02:21:10 -0400
|
Date: Tue, 8 Apr 2025 02:21:10 -0400
|
||||||
Subject: [PATCH 12/13] add option to disable logging
|
Subject: [PATCH 12/13] add option to disable logging
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From e3cfa0f2dc3f7fc74c90db9f5636e7b4c43eb0c8 Mon Sep 17 00:00:00 2001
|
From e2b7c8156fbc137f621036b2dd5fa4d34e383a0a Mon Sep 17 00:00:00 2001
|
||||||
From: Fijxu <fijxu@nadeko.net>
|
From: Fijxu <fijxu@nadeko.net>
|
||||||
Date: Wed, 9 Apr 2025 13:37:16 -0400
|
Date: Wed, 9 Apr 2025 13:37:16 -0400
|
||||||
Subject: [PATCH 13/13] metrics: track unidentified innertube errors
|
Subject: [PATCH 13/13] metrics: track unidentified innertube errors
|
||||||
|
|
Loading…
Add table
Reference in a new issue