less error-prone version
This commit is contained in:
parent
14137c30c8
commit
2daae6a4c3
1 changed files with 2 additions and 2 deletions
|
@ -157,8 +157,8 @@ def parse_item_files(files):
|
|||
for version_key in version_files:
|
||||
for extension in EXTENSIONS['subtitle']:
|
||||
subtitle_files = [file for file in version_files[version_key] if file['extension'] == extension]
|
||||
subtitle_languages = set([file['language'] for file in subtitle_files])
|
||||
if len(subtitle_languages) == 1 and LANGUAGES[0] in subtitle_languages:
|
||||
subtitle_languages = list(set([file['language'] for file in subtitle_files]))
|
||||
if len(subtitle_languages) == 1 and subtitle_languages[0] == LANGUAGES[0]:
|
||||
for subtitle_file in subtitle_files:
|
||||
subtitle_file['normalizedPath'] = format_path(dict(subtitle_file, **{'language': None}))
|
||||
# return data
|
||||
|
|
Loading…
Reference in a new issue