mirror of
https://github.com/morpheus65535/bazarr
synced 2025-02-20 21:17:02 +00:00
Fixed indexing of unsupported language codes. #1683
This commit is contained in:
parent
3b3d6fe36a
commit
9d30414f9d
1 changed files with 6 additions and 2 deletions
|
@ -86,7 +86,9 @@ def store_subtitles(original_path, reversed_path, use_cache=True):
|
|||
logging.exception("BAZARR unable to index external subtitles.")
|
||||
else:
|
||||
for subtitle, language in subtitles.items():
|
||||
if not language:
|
||||
valid_language = alpha2_from_alpha3(language.alpha3)
|
||||
if not valid_language:
|
||||
logging.debug(f'{language.alpha3} is an unsupported language code.')
|
||||
continue
|
||||
|
||||
subtitle_path = get_external_subtitles_path(reversed_path, subtitle)
|
||||
|
@ -188,7 +190,9 @@ def store_subtitles_movie(original_path, reversed_path, use_cache=True):
|
|||
pass
|
||||
else:
|
||||
for subtitle, language in subtitles.items():
|
||||
if not language:
|
||||
valid_language = alpha2_from_alpha3(language.alpha3)
|
||||
if not valid_language:
|
||||
logging.debug(f'{language.alpha3} is an unsupported language code.')
|
||||
continue
|
||||
|
||||
subtitle_path = get_external_subtitles_path(reversed_path, subtitle)
|
||||
|
|
Loading…
Reference in a new issue