Skip to content

Commit

Permalink
Merge pull request #3075 from SamantazFox/video-api-newpipe-compat-2
Browse files Browse the repository at this point in the history
Video API: Improve NewPipe compatibility (part 2)
  • Loading branch information
SamantazFox authored May 1, 2022
2 parents 66e2c01 + 7f2176d commit ac686fe
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 ac686fe

Please sign in to comment.