Skip to content

Commit

Permalink
Add 'targetDurationSec' and 'maxDvrDurationSec' to videos API
Browse files Browse the repository at this point in the history
  • Loading branch information
SamantazFox committed May 1, 2022
1 parent 04953d9 commit 7f2176d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/invidious/videos.cr
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,10 @@ struct Video
end
end

# Livestream chunk infos
json.field "targetDurationSec", fmt["targetDurationSec"].as_i if fmt.has_key?("targetDurationSec")
json.field "maxDvrDurationSec", fmt["maxDvrDurationSec"].as_i if fmt.has_key?("maxDvrDurationSec")

# Audio-related data
json.field "audioQuality", fmt["audioQuality"] if fmt.has_key?("audioQuality")
json.field "audioSampleRate", fmt["audioSampleRate"].as_s.to_i if fmt.has_key?("audioSampleRate")
Expand Down

0 comments on commit 7f2176d

Please sign in to comment.