fix: reintroduced fix for live or upcoming videos in related feed

This commit is contained in:
2025-09-05 18:19:18 +02:00
parent a814797363
commit 3cf203ee27

View File

@@ -611,6 +611,9 @@ def parseLengthFromTimeBadge(time_str: str) -> int:
length = 0
time_lookup_list = [1, 60, 3_600, 86_400]
time_list = time_str.split(":")
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