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: