fix title for episode only series
This commit is contained in:
parent
bac441158b
commit
0b3aaae981
1 changed files with 9 additions and 5 deletions
14
ox/movie.py
14
ox/movie.py
|
@ -87,6 +87,15 @@ def parse_movie_path(path):
|
||||||
episodeTitle = fileparts[episodeTitle]
|
episodeTitle = fileparts[episodeTitle]
|
||||||
if episodeTitle == extension or episodeTitle.startswith('Part'):
|
if episodeTitle == extension or episodeTitle.startswith('Part'):
|
||||||
episodeTitle = None
|
episodeTitle = None
|
||||||
|
|
||||||
|
if not season and 'Episode' in fileparts:
|
||||||
|
episodeTitle = fileparts.index('Episode') + 1
|
||||||
|
episodeTitle = fileparts[episodeTitle]
|
||||||
|
if episodeTitle == extension or episodeTitle.startswith('Part'):
|
||||||
|
episodeTitle = None
|
||||||
|
else:
|
||||||
|
season = 1
|
||||||
|
|
||||||
if season:
|
if season:
|
||||||
seriesTitle = title
|
seriesTitle = title
|
||||||
title = u'%s (S%02d)' % (seriesTitle, season)
|
title = u'%s (S%02d)' % (seriesTitle, season)
|
||||||
|
@ -95,11 +104,6 @@ def parse_movie_path(path):
|
||||||
if episodeTitle:
|
if episodeTitle:
|
||||||
title = u'%s %s' % (title, episodeTitle)
|
title = u'%s %s' % (title, episodeTitle)
|
||||||
|
|
||||||
if 'Episode' in fileparts:
|
|
||||||
episodeTitle = fileparts.index('Episode') + 1
|
|
||||||
episodeTitle = fileparts[episodeTitle]
|
|
||||||
if episodeTitle == extension or episodeTitle.startswith('Part'):
|
|
||||||
episodeTitle = None
|
|
||||||
#part
|
#part
|
||||||
part = findRe(parts[-1], '\.Part (\d+)\.')
|
part = findRe(parts[-1], '\.Part (\d+)\.')
|
||||||
if part:
|
if part:
|
||||||
|
|
Loading…
Reference in a new issue