mirror of
https://github.com/iv-org/invidious
synced 2024-11-24 03:53:27 +01:00
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