From 43951cf488bb8898b632e152f3d0fce1f273613f Mon Sep 17 00:00:00 2001 From: Daniil Hikkamorii Date: Thu, 23 Nov 2023 19:35:40 +0200 Subject: [PATCH] Specify format as audio/opus instead of audio/webm Previously, when using download feature, opus audio would be listed as audio/webm. This may be confusing and so exact codec is specified. --- src/invidious/frontend/watch_page.cr | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/invidious/frontend/watch_page.cr b/src/invidious/frontend/watch_page.cr index c8cb7110..9cece7d4 100644 --- a/src/invidious/frontend/watch_page.cr +++ b/src/invidious/frontend/watch_page.cr @@ -74,6 +74,9 @@ module Invidious::Frontend::WatchPage video_assets.audio_streams.each do |option| mimetype = option["mimeType"].as_s.split(";")[0] + if mimetype == "audio/webm" + mimetype = "audio/opus" + end value = {"itag": option["itag"], "ext": mimetype.split("/")[1]}.to_json