Skip to content

Commit

Permalink
If there isn't a season available, asume it's an absolute numbered ep. (
Browse files Browse the repository at this point in the history
  • Loading branch information
p0psicles authored Jun 16, 2021
1 parent 5ad87b2 commit ec74f49
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit ec74f49

Please sign in to comment.