Embedded Subtitles provider: add support for alpha2 tags

Done by updating the fese library
pull/1951/head
vitiko98 2 years ago
parent a0f8d75f04
commit 803dfe3512

@ -4,4 +4,4 @@
from .container import FFprobeVideoContainer from .container import FFprobeVideoContainer
from .stream import FFprobeSubtitleStream from .stream import FFprobeSubtitleStream
__version__ = "0.2.2" __version__ = "0.2.3"

@ -128,7 +128,11 @@ def _get_language(tags) -> Language:
return Language(*extra["language_args"]) return Language(*extra["language_args"])
try: 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 # Test for suffix
assert lang.alpha2 assert lang.alpha2

Loading…
Cancel
Save