-
Notifications
You must be signed in to change notification settings - Fork 110
Open
Description
so i have this issue i tried debugging it and i found the cause which is when there is no season available in file name it causes this error solution:
def extract_season_episode(filename):
for pattern, (season_group, episode_group) in SEASON_EPISODE_PATTERNS:
match = pattern.search(filename)
if match:
if season_group is not None:
season = match.group(1)
episode = match.group(2)
else:
#default S1
season = "1"
episode = match.group(1)
logger.info(f"Extracted season: {season}, episode: {episode} from {filename}")
return season, episode
logger.warning(f"No season/episode pattern matched for {filename}")
return "1", None
Metadata
Metadata
Assignees
Labels
No labels