normalize_paths not needed as extra function

This commit is contained in:
j 2013-05-31 15:23:38 +02:00
parent 913c8f4c1b
commit 8bd76ed27f

View file

@ -172,17 +172,8 @@ def parse_item_files(files):
'subtitleLanguage': language[version_key] if version_key in language else None,
'version': version_key
})
data = normalize_paths(data)
return data
def normalize_paths(versions):
for version in versions:
for extension in EXTENSIONS['subtitle']:
files = [file for file in version['files'] if file['extension'] == extension]
if len(files) == 1 and files[0]['language'] == LANGUAGES[0]:
files[0]['normalizedPath'] = format_path(dict(files[0], **{'language': None}))
return versions
def parse_path(path, directory_key='director'):
'''
# all keys