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:
Fijxu
2024-10-30 13:14:54 -03:00
parent 26bee068eb
commit c61b2963ac
2 changed files with 8 additions and 0 deletions

View File

@@ -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