fix(ROKU): Fix invalid timestamps

This commit is contained in:
stabbedbybrick 2024-04-12 10:32:57 +02:00
parent 255a832039
commit 4248684ea5

View File

@ -206,7 +206,7 @@ class ROKU(Service):
chapters = [] chapters = []
if track.data.get("playbackMedia", {}).get("adBreaks"): if track.data.get("playbackMedia", {}).get("adBreaks"):
timestamps = sorted(track.data["playbackMedia"]["adBreaks"]) timestamps = sorted(track.data["playbackMedia"]["adBreaks"])
chapters = [Chapter(name=f"Chapter {i + 1:02}", timestamp=ad) for i, ad in enumerate(timestamps)] chapters = [Chapter(name=f"Chapter {i + 1:02}", timestamp=ad.split(".")[0]) for i, ad in enumerate(timestamps)]
if track.data.get("playbackMedia", {}).get("creditCuePoints"): if track.data.get("playbackMedia", {}).get("creditCuePoints"):
chapters.append( chapters.append(