From 7f2176d7fcc8e65b5eab97e991b8b853a952a0a0 Mon Sep 17 00:00:00 2001 From: Samantaz Fox Date: Sun, 1 May 2022 17:00:56 +0200 Subject: [PATCH] Add 'targetDurationSec' and 'maxDvrDurationSec' to videos API --- src/invidious/videos.cr | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/invidious/videos.cr b/src/invidious/videos.cr index 27c2b6d1..8a6a0f1a 100644 --- a/src/invidious/videos.cr +++ b/src/invidious/videos.cr @@ -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")