From 76a0ec07ee2ffefa3add4073a041fe3882ad8915 Mon Sep 17 00:00:00 2001 From: girst Date: Fri, 12 Jun 2020 20:36:55 +0200 Subject: [PATCH] fix livestream detection isPostLiveDvr is not present if False. --- app/common/common.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/common/common.py b/app/common/common.py index 6339933..7bce366 100644 --- a/app/common/common.py +++ b/app/common/common.py @@ -122,7 +122,8 @@ def get_video_info(video_id, sts=0, algo=""): # without videoDetails, there's only the error message maybe_metadata = metadata if 'videoDetails' in metadata else None return None, maybe_metadata, 'player', player_error - if metadata['videoDetails']['isLiveContent']: + if metadata['videoDetails']['isLiveContent'] and \ + metadata['videoDetails'].get('isPostLiveDvr', False): return None, metadata, 'livestream', None if not 'formats' in metadata['streamingData']: -- 2.39.3