renge/invidious: Fix mime type in opus patch

nazuna
Simon Bruder 2022-08-11 17:54:56 +02:00
parent 8e96133b7b
commit 7471719ef2
Signed by: simon
GPG Key ID: 8D3C82F9F309F8EC
1 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
From 237067e0b6bf005763090a6b063daa3bc4bb8d90 Mon Sep 17 00:00:00 2001
From a5b4cf207d3942963d8d7553ec3d6cd36bdc41fc Mon Sep 17 00:00:00 2001
From: Simon Bruder <simon@sbruder.de>
Date: Thu, 9 Sep 2021 16:56:57 +0200
Subject: [PATCH] Prefer opus audio streams in listen mode
@ -8,7 +8,7 @@ Subject: [PATCH] Prefer opus audio streams in listen mode
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/invidious/views/components/player.ecr b/src/invidious/views/components/player.ecr
index c3c02df0..3278bcba 100644
index c3c02df0..82c89500 100644
--- a/src/invidious/views/components/player.ecr
+++ b/src/invidious/views/components/player.ecr
@@ -7,14 +7,14 @@
@ -26,7 +26,7 @@ index c3c02df0..3278bcba 100644
- if (fmt["mimeType"].as_s.starts_with?("audio/mp4") && bandwidth > best_m4a_stream_bitrate)
- best_m4a_stream_bitrate = bandwidth
- best_m4a_stream_index = i
+ if (fmt["mimeType"].as_s.starts_with?("audio/opus") && bandwidth > best_opus_stream_bitrate)
+ if (fmt["mimeType"].as_s.starts_with?("audio/webm") && bandwidth > best_opus_stream_bitrate)
+ best_opus_stream_bitrate = bandwidth
+ best_opus_stream_index = i
end