mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2023-06-08.git
synced 2024-08-15 00:53:38 +00:00
Add extra data to 'adaptiveFormats' in videos API
This commit is contained in:
parent
0503d2a9f3
commit
8144308aee
1 changed files with 9 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue