mirror of
https://github.com/iv-org/invidious.git
synced 2024-11-08 21:52:28 +05:30
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
@ -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 New Issue
Block a user