Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If there isn't a season available, asume it's an absolute numbered ep. #9620

Merged
merged 1 commit into from
Jun 16, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions medusa/providers/torrent/json/animebytes.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def is_season_exception(series_name):

if release_type == SINGLE_EP:
# Create the single episode release_name (use the shows default title)
if is_season_exception(group.get('SeriesName')):
if is_season_exception(group.get('SeriesName')) or not season:
# If this is a season exception, we can't parse the release name like:
# Show.Title.Season.3.Exception.S01E01...
# As that will confuse the parser, as it already has a season available.
Expand All @@ -243,7 +243,7 @@ def is_season_exception(series_name):
else:
title = '{title}.{season}.{episode}.{tags}' \
'{release_group}'.format(title=group.get('SeriesName'),
season='S{0:02d}'.format(int(season)) if season else 'S01',
season='S{0:02d}'.format(int(season)),
episode='E{0:02d}'.format(int(episode)),
tags=tags,
release_group=release_group)
Expand Down