Add bitrate to formatStreams in /api/v1/videos/{id} response
This commit is contained in:
parent
b673695aa2
commit
f313162fa1
1 changed files with 2 additions and 0 deletions
|
@ -160,6 +160,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