1
0
mirror of https://github.com/iv-org/invidious.git synced 2025-04-03 09:45:27 +05:30

Add extra data to 'adaptiveFormats' in videos API

This commit is contained in:
Samantaz Fox 2022-04-27 00:21:23 +02:00
parent 0503d2a9f3
commit 8144308aee
No known key found for this signature in database
GPG Key ID: F42821059186176E

@ -412,6 +412,15 @@ struct Video
end
end
end
# Audio-related data
json.field "audioQuality", fmt["audioQuality"] if fmt.has_key?("audioQuality")
json.field "audioSampleRate", fmt["audioSampleRate"].as_s.to_i if fmt.has_key?("audioSampleRate")
json.field "audioChannels", fmt["audioChannels"] if fmt.has_key?("audioChannels")
# Extra misc stuff
json.field "colorInfo", fmt["colorInfo"] if fmt.has_key?("colorInfo")
json.field "captionTrack", fmt["captionTrack"] if fmt.has_key?("captionTrack")
end
end
end