mirror of
https://github.com/iv-org/invidious.git
synced 2024-11-30 02:32:56 +05:30
Add bitrate to formatStreams in /api/v1/videos/{id} response
This commit is contained in:
parent
b673695aa2
commit
f313162fa1
@ -160,6 +160,8 @@ module Invidious::JSONify::APIv1
|
|||||||
json.field "type", fmt["mimeType"]
|
json.field "type", fmt["mimeType"]
|
||||||
json.field "quality", fmt["quality"]
|
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"])
|
fmt_info = Invidious::Videos::Formats.itag_to_metadata?(fmt["itag"])
|
||||||
if fmt_info
|
if fmt_info
|
||||||
fps = fmt_info["fps"]?.try &.to_i || fmt["fps"]?.try &.as_i || 30
|
fps = fmt_info["fps"]?.try &.to_i || fmt["fps"]?.try &.as_i || 30
|
||||||
|
Loading…
Reference in New Issue
Block a user