fixup! Videos: Fix audio tracks language.
All checks were successful
Invidious CI / build (push) Successful in 5m57s

This commit is contained in:
Fijxu 2024-10-30 13:35:51 -03:00
parent 7b662b008c
commit 09a1935629
Signed by: Fijxu
GPG key ID: 32C1DDF333EDA6A4
2 changed files with 2 additions and 4 deletions

View file

@ -56,7 +56,7 @@ module Invidious::Routes::API::Manifest
end
audio_streams.reject! do |z|
z if z["audioTrack"]["audioIsDefault"].as_bool == false
z if z.dig?("audioTrack", "audioIsDefault") == false
end
manifest = XML.build(indent: " ", encoding: "UTF-8") do |xml|

View file

@ -153,11 +153,9 @@ module Invidious::Routes::Watch
end
audio_streams.reject! do |z|
z if z["audioTrack"]["audioIsDefault"].as_bool == false
z if z.dig?("audioTrack", "audioIsDefault") == false
end
pp audio_streams
# Older videos may not have audio sources available.
# We redirect here so they're not unplayable
if audio_streams.empty? && !video.live_now