support new series format in parse_movie_path
This commit is contained in:
parent
b728fdc9b7
commit
ebf3b691b2
1 changed files with 38 additions and 25 deletions
13
ox/movie.py
13
ox/movie.py
|
@ -374,6 +374,19 @@ def parse_movie_path(path):
|
||||||
language = ''
|
language = ''
|
||||||
|
|
||||||
#season/episode/episodeTitle
|
#season/episode/episodeTitle
|
||||||
|
match = re.compile('(.+?) \((S(\d+))?(E(\d+))?\)( (.+?))?\.').match(parts[-1])
|
||||||
|
if match:
|
||||||
|
seriesTitle = match.group(1)
|
||||||
|
season = match.group(3)
|
||||||
|
episode = match.group(5)
|
||||||
|
episodeTitle = (match.group(6) or '').strip()
|
||||||
|
if episode != None:
|
||||||
|
episode = int(episode)
|
||||||
|
if season != None:
|
||||||
|
season = int(season)
|
||||||
|
if episode and not season:
|
||||||
|
season = 1
|
||||||
|
else:
|
||||||
season = find_re(parts[-1], '\.Season (\d+)\.')
|
season = find_re(parts[-1], '\.Season (\d+)\.')
|
||||||
if season:
|
if season:
|
||||||
season = int(season)
|
season = int(season)
|
||||||
|
|
Loading…
Reference in a new issue