Add possibility to rip series disc with one title

This commit is contained in:
2023-03-06 19:15:04 +01:00
parent 19fcd9d1f0
commit dbdea3b638
2 changed files with 15 additions and 5 deletions

View File

@ -23,7 +23,7 @@ OUT_VIDEO_FORMAT = os.environ["OUT_VIDEO_FORMAT"]
MIN_EPISODES_DURATION_SECONDS = int(os.environ["MIN_EPISODES_DURATION_MINUTES"]) * 60
MAX_EPISODES_DURATION_SECONDS = int(os.environ["MAX_EPISODES_DURATION_MINUTES"]) * 60
SERIES_TITLE_REGEX = r"S(\d+)[ _]?E(\d+)-(\d+)$"
SERIES_TITLE_REGEX = r"S(\d+)[ _]?E(\d+)(-(\d+))?$"
def main():
@ -89,9 +89,13 @@ class Dvd:
series = int(re_matches.group(1))
episode_from = int(re_matches.group(2))
episode_to = int(re_matches.group(3))
episode_to = re_matches.group(4)
if episode_to:
episode_to = int(episode_to)
else:
episode_to = episode_from
if episode_from >= episode_to:
if episode_from > episode_to:
return None
episodes = list(range(episode_from, episode_to + 1))