mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2025-06-27 17:38:25 +00:00
Videos: Fix audio tracks language.
Video will only return the default language. The rest of the audio tracks are deleted since they will not be used.
This commit is contained in:
parent
26bee068eb
commit
c61b2963ac
@ -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",
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user