support new series format in parse_movie_path

This commit is contained in:
j 2012-08-22 00:53:08 +02:00
parent b728fdc9b7
commit ebf3b691b2

View file

@ -374,6 +374,19 @@ def parse_movie_path(path):
language = ''
#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+)\.')
if season:
season = int(season)