We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 64394f1 commit 46a637eCopy full SHA for 46a637e
services/renamer.py
@@ -39,10 +39,12 @@ def extract_data(match_result):
39
episode = match_result.group('episode')
40
season = 1
41
42
- season_match = re.match('.*(S(?P<season>[0-9]{1}))$', name)
+ season_match = re.match('(?P<name>.*)(S(?P<season>[0-9]{1}))$', name)
43
if season_match:
44
season = int(season_match.group('season'))
45
+ name = season_match.group('name')
46
47
season = '0' + str(season) if season < 10 else str(season)
48
+ name = name.replace('_', ' ')
49
50
return name, season, episode
0 commit comments