YT: live videos with duration are not live anymore

This commit is contained in:
Rafał Dzięgiel
2021-04-18 14:11:45 +02:00
parent eaf090d2e2
commit e721130a63

View File

@@ -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 */