From 3cf203ee2725191d4aa7c141c3aae7e6a0be0ba9 Mon Sep 17 00:00:00 2001 From: sherl Date: Fri, 5 Sep 2025 18:19:18 +0200 Subject: [PATCH] fix: reintroduced fix for live or upcoming videos in related feed --- ythdd_inv_tl.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ythdd_inv_tl.py b/ythdd_inv_tl.py index 41e70ca..da792fd 100644 --- a/ythdd_inv_tl.py +++ b/ythdd_inv_tl.py @@ -611,8 +611,11 @@ def parseLengthFromTimeBadge(time_str: str) -> int: length = 0 time_lookup_list = [1, 60, 3_600, 86_400] time_list = time_str.split(":") - for z in range(len(time_list)): - length += time_lookup_list[z] * int(time_list[len(time_list) - 1 - z]) + if False in map(doesContainNumber, time_list): # works around ['LIVE'] for livestreams or ['Upcoming'] for scheduled videos + pass + else: + for z in range(len(time_list)): + length += time_lookup_list[z] * int(time_list[len(time_list) - 1 - z]) return length def parseViewsFromViewText(viewcounttext: str) -> int: