mirror of
https://git.nerdvpn.de/NerdVPN.de/invidious
synced 2026-02-14 22:51:42 +01:00
Fix ts lint error
This commit is contained in:
@@ -6,7 +6,7 @@ Subject: [PATCH 2/4] [Patch] 002 - limit DASH resolution
|
||||
---
|
||||
config/config.example.toml | 1 +
|
||||
src/lib/helpers/config.ts | 4 ++++
|
||||
src/routes/invidious_routes/dashManifest.ts | 4 +++-
|
||||
src/routes/invidious_routes/dashManifest.ts | 5 ++++-
|
||||
3 files changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/config/config.example.toml b/config/config.example.toml
|
||||
@@ -40,12 +40,15 @@ diff --git a/src/routes/invidious_routes/dashManifest.ts b/src/routes/invidious_
|
||||
index b582b40..b4ed64c 100644
|
||||
--- a/src/routes/invidious_routes/dashManifest.ts
|
||||
+++ b/src/routes/invidious_routes/dashManifest.ts
|
||||
@@ -71,7 +71,7 @@ dashManifest.get("/:videoId", async (c) => {
|
||||
@@ -71,7 +71,10 @@ dashManifest.get("/:videoId", async (c) => {
|
||||
videoInfo.streaming_data.adaptive_formats = videoInfo
|
||||
.streaming_data.adaptive_formats
|
||||
.filter((i) =>
|
||||
- i.mime_type.includes("mp4")
|
||||
+ i.mime_type.includes("mp4") && i.height <= config.server.max_dash_resolution
|
||||
+ //@ts-ignore: 'i.height' is possibly 'undefined'.
|
||||
+ i.mime_type.includes("mp4") && (i.height
|
||||
+ ? i.height <= config.server.max_dash_resolution
|
||||
+ : true)
|
||||
);
|
||||
|
||||
const player_response = videoInfo.page[0];
|
||||
|
||||
Reference in New Issue
Block a user