movie.py: more bugfixes
This commit is contained in:
parent
436abe3def
commit
84a8a82fcb
1 changed files with 4 additions and 3 deletions
|
@ -113,7 +113,7 @@ def parse_item_files(files):
|
||||||
else:
|
else:
|
||||||
version_files[key] = (version_files[key] if key in version_files else []) + [file]
|
version_files[key] = (version_files[key] if key in version_files else []) + [file]
|
||||||
extension[key] = None
|
extension[key] = None
|
||||||
# determine main_files (video + subtitles)
|
# determine main_files (video + srt)
|
||||||
full = {}
|
full = {}
|
||||||
language = {}
|
language = {}
|
||||||
main_files = {}
|
main_files = {}
|
||||||
|
@ -135,11 +135,12 @@ def parse_item_files(files):
|
||||||
language[version_key] = subtitle_language
|
language[version_key] = subtitle_language
|
||||||
main_files[version_key] += language_files
|
main_files[version_key] += language_files
|
||||||
break
|
break
|
||||||
# determine main version (best subtitle language, then video time)
|
# determine main version (best srt language, then video time)
|
||||||
main_version = None
|
main_version = None
|
||||||
full_version_keys = sorted(
|
full_version_keys = sorted(
|
||||||
[version_key for version_key in version_files if full[version_key]],
|
[version_key for version_key in version_files if full[version_key]],
|
||||||
key=lambda x: -time[x]
|
key=lambda x: time[x],
|
||||||
|
reverse=True
|
||||||
)
|
)
|
||||||
if full_version_keys:
|
if full_version_keys:
|
||||||
language_version_keys = sorted(
|
language_version_keys = sorted(
|
||||||
|
|
Loading…
Reference in a new issue