mirror of
https://github.com/morpheus65535/bazarr
synced 2025-03-04 02:18:12 +00:00
Fix for invalid language code.
This commit is contained in:
parent
ba2920423c
commit
7c75ae7615
1 changed files with 4 additions and 0 deletions
|
@ -614,6 +614,10 @@ def _search_external_subtitles(path, languages=None, only_one=False, scandir_gen
|
|||
# extract the potential language code
|
||||
try:
|
||||
language_code = p_root.rsplit(".", 1)[1].replace('_', '-')
|
||||
try:
|
||||
language_code = Language.fromietf(language_code)
|
||||
except ValueError:
|
||||
language_code = None
|
||||
except IndexError:
|
||||
language_code = None
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue