fix '.en' stripping (movies can have parts, do don't check for '1 srt is en', but 'all srts are en')
This commit is contained in:
parent
8bd76ed27f
commit
c33edd3ff3
1 changed files with 5 additions and 3 deletions
|
@ -156,9 +156,11 @@ def parse_item_files(files):
|
||||||
# remove unneeded '.en'
|
# remove unneeded '.en'
|
||||||
for version_key in version_files:
|
for version_key in version_files:
|
||||||
for extension in EXTENSIONS['subtitle']:
|
for extension in EXTENSIONS['subtitle']:
|
||||||
files = [file for file in version_files[version_key] if file['extension'] == extension]
|
subtitle_files = [file for file in version_files[version_key] if file['extension'] == extension]
|
||||||
if len(files) == 1 and files[0]['language'] == LANGUAGES[0]:
|
subtitle_languages = set([file['language'] for file in subtitle_files])
|
||||||
files[0]['normalizedPath'] = format_path(dict(files[0], **{'language': None}))
|
if len(languages) == 1 and languages[0] == LANGUAGES[0]:
|
||||||
|
for subtitle_file in subtitle_files:
|
||||||
|
subtitle_file['normalizedPath'] = format_path(dict(subtitle_file, **{'language': None}))
|
||||||
# return data
|
# return data
|
||||||
data = []
|
data = []
|
||||||
for version_key in version_files:
|
for version_key in version_files:
|
||||||
|
|
Loading…
Reference in a new issue