diff options
author | vitiko98 <[email protected]> | 2022-09-20 17:18:24 -0400 |
---|---|---|
committer | vitiko98 <[email protected]> | 2022-09-20 17:18:24 -0400 |
commit | 803dfe351201ae602d9f3e96cfb01d79604296fc (patch) | |
tree | f1afeec4d3213cf5ce99bf1eb9df34cddd7f92ec /libs/fese | |
parent | a0f8d75f0442f9d1f8f2f7dfc631714f31529381 (diff) | |
download | bazarr-803dfe351201ae602d9f3e96cfb01d79604296fc.tar.gz bazarr-803dfe351201ae602d9f3e96cfb01d79604296fc.zip |
Embedded Subtitles provider: add support for alpha2 tags
Done by updating the fese library
Diffstat (limited to 'libs/fese')
-rwxr-xr-x | libs/fese/__init__.py | 2 | ||||
-rw-r--r-- | libs/fese/tags.py | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/libs/fese/__init__.py b/libs/fese/__init__.py index fa9d7a754..ae8c75c38 100755 --- a/libs/fese/__init__.py +++ b/libs/fese/__init__.py @@ -4,4 +4,4 @@ from .container import FFprobeVideoContainer from .stream import FFprobeSubtitleStream -__version__ = "0.2.2" +__version__ = "0.2.3" diff --git a/libs/fese/tags.py b/libs/fese/tags.py index cdd932761..eee5c336e 100644 --- a/libs/fese/tags.py +++ b/libs/fese/tags.py @@ -128,7 +128,11 @@ def _get_language(tags) -> Language: return Language(*extra["language_args"]) try: - lang = Language.fromalpha3b(og_lang) + if len(og_lang) == 3: + lang = Language.fromalpha3b(og_lang) + else: + lang = Language.fromalpha2(og_lang[:2]) + # Test for suffix assert lang.alpha2 |