diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 84e6adfe1..b1b1e33bd 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -5,6 +5,7 @@ on: branches: - master - develop + - dvd-seasons env: REGISTRY: ghcr.io diff --git a/src/prep.py b/src/prep.py index 69a3fea0a..ae6987c34 100644 --- a/src/prep.py +++ b/src/prep.py @@ -1125,7 +1125,15 @@ def dvd_screenshots(self, meta, disc_num, num_screens=None): sar = 1 for track in ifo_mi.tracks: if track.track_type == "Video": - length = float(track.duration)/1000 # noqa F841 + if isinstance(track.duration, str): + # If the duration is a string, split and find the longest duration + durations = [float(d) for d in track.duration.split(' / ')] + length = max(durations) / 1000 # Use the longest duration + else: + # If the duration is already an int or float, use it directly + length = float(track.duration) / 1000 # noqa #F841 # Convert to seconds + + # Proceed as usual for other fields par = float(track.pixel_aspect_ratio) dar = float(track.display_aspect_ratio) width = float(track.width)