API: Add bitrate to formatStreams too (#4590)
Before this PR, the bitrate was only returned for the 'adaptiveFormats'. They are now also returned the 'formatStreams'. No linked issue
This commit is contained in:
commit
8eaaeb1c74
1 changed files with 2 additions and 0 deletions
|
@ -161,6 +161,8 @@ module Invidious::JSONify::APIv1
|
|||
json.field "type", fmt["mimeType"]
|
||||
json.field "quality", fmt["quality"]
|
||||
|
||||
json.field "bitrate", fmt["bitrate"].as_i.to_s if fmt["bitrate"]?
|
||||
|
||||
fmt_info = Invidious::Videos::Formats.itag_to_metadata?(fmt["itag"])
|
||||
if fmt_info
|
||||
fps = fmt_info["fps"]?.try &.to_i || fmt["fps"]?.try &.as_i || 30
|
||||
|
|
Loading…
Reference in a new issue