merging changes

This commit is contained in:
rolux 2012-09-01 05:16:28 +02:00
parent fb26797b95
commit e04cc5b819

View file

@ -39,7 +39,6 @@ def format_path(data, has_director_directory=True):
director = data['seriesDirectorSort' if data['isEpisode'] else 'directorSort'] or ['Unknown Director']
title = data['seriesTitle' if data['isEpisode'] else 'title'] or 'Untitled'
year = data['seriesYear' if data['isEpisode'] else 'year']
language = 'en' if data['type'] == 'subtitle' and data['language'] == None else data['language']
parts = map(format_underscores, filter(lambda x: x != None, [
data['directory'] or director[0][0] if has_director_directory else title[0],
'; '.join(director) if has_director_directory else None,
@ -58,7 +57,6 @@ def format_path(data, has_director_directory=True):
return '/'.join(parts)
def parse_item_files(files):
# parses a list of file objects associated with one item (file objects
# as returned by parse_path, but extended with 'path' and 'time')
@ -374,19 +372,6 @@ 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)