From e721130a63a8f0ff85210581154391cc5f2f50e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Dzi=C4=99giel?= Date: Sun, 18 Apr 2021 14:11:45 +0200 Subject: [PATCH] YT: live videos with duration are not live anymore --- src/youtube.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/youtube.js b/src/youtube.js index 5d7cdfed..106df4ec 100644 --- a/src/youtube.js +++ b/src/youtube.js @@ -364,7 +364,11 @@ var YouTubeClient = GObject.registerClass({ async getHLSUriAsync(info, itagOpts) { - const isLive = info.videoDetails.isLiveContent; + const isLive = ( + info.videoDetails.isLiveContent + && (!info.videoDetails.lengthSeconds + || Number(info.videoDetails.lengthSeconds) <= 0) + ); debug(`video is live: ${isLive}`); /* YouTube only uses HLS for live content */