From 3d50aa965226f2c57a98ac96ff0f614ba791a76b Mon Sep 17 00:00:00 2001 From: girst Date: Wed, 15 Dec 2021 20:23:40 +0100 Subject: [PATCH] prefer microformat.publishDate applies to g_v_i(metaOnly). videoDetails.publishDate is "0" for premiere videos. --- app/common/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/common/common.py b/app/common/common.py index 44fa774..7df63b3 100644 --- a/app/common/common.py +++ b/app/common/common.py @@ -303,7 +303,7 @@ def video_metadata(metadata): # sometimes, we receive the notification so early that the length is not # yet populated. Nothing we can do about it. - length = int(meta1.get('lengthSeconds',0)) or None + length = int(meta2.get('lengthSeconds',0)) or int(meta1.get('lengthSeconds',0)) or None scheduled_time = metadata.get('playabilityStatus',{}) \ .get('liveStreamability',{}).get('liveStreamabilityRenderer',{}) \ -- 2.39.3