diff --git a/src/invidious/routes/api/manifest.cr b/src/invidious/routes/api/manifest.cr index c6906346..c353ea75 100644 --- a/src/invidious/routes/api/manifest.cr +++ b/src/invidious/routes/api/manifest.cr @@ -55,6 +55,10 @@ module Invidious::Routes::API::Manifest end end + audio_streams.reject! do |z| + z if z.dig?("audioTrack", "audioIsDefault") == false + end + manifest = XML.build(indent: " ", encoding: "UTF-8") do |xml| xml.element("MPD", "xmlns": "urn:mpeg:dash:schema:mpd:2011", "profiles": "urn:mpeg:dash:profile:full:2011", minBufferTime: "PT1.5S", type: "static", diff --git a/src/invidious/routes/watch.cr b/src/invidious/routes/watch.cr index 3a90d822..2d2050dd 100644 --- a/src/invidious/routes/watch.cr +++ b/src/invidious/routes/watch.cr @@ -152,6 +152,10 @@ module Invidious::Routes::Watch end end + audio_streams.reject! do |z| + z if z.dig?("audioTrack", "audioIsDefault") == false + end + # Older videos may not have audio sources available. # We redirect here so they're not unplayable if audio_streams.empty? && !video.live_now