summaryrefslogtreecommitdiffhomepage
path: root/libs/subzero
diff options
context:
space:
mode:
authorpanni <[email protected]>2019-12-24 00:25:02 +0100
committerpanni <[email protected]>2019-12-24 00:25:02 +0100
commit64fa210688628e21c4c5fbc3b127d25cbe283b4c (patch)
treeee2ab3a832a5bcbeaba198f9f826b5a29616a601 /libs/subzero
parent5dc8facae7dfe5b50d8f35c92750f4c07e5d6e79 (diff)
downloadbazarr-64fa210688628e21c4c5fbc3b127d25cbe283b4c.tar.gz
bazarr-64fa210688628e21c4c5fbc3b127d25cbe283b4c.zip
core: update to subliminal_patch:head; core: try and fix #703
Diffstat (limited to 'libs/subzero')
-rw-r--r--libs/subzero/language.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/libs/subzero/language.py b/libs/subzero/language.py
index d212a02f4..38cfb8113 100644
--- a/libs/subzero/language.py
+++ b/libs/subzero/language.py
@@ -4,7 +4,7 @@ import types
import re
from babelfish.exceptions import LanguageError
-from babelfish import Language as Language_, basestr
+from babelfish import Language as Language_, basestr, LANGUAGE_MATRIX
from six.moves import zip
repl_map = {
@@ -33,6 +33,12 @@ repl_map = {
}
+ALPHA2_LIST = list(set(filter(lambda x: x, map(lambda x: x.alpha2, LANGUAGE_MATRIX)) + repl_map.values()))
+ALPHA3b_LIST = list(set(filter(lambda x: x, map(lambda x: x.alpha3, LANGUAGE_MATRIX)) +
+ filter(lambda x: len(x) == 3, repl_map.keys())))
+FULL_LANGUAGE_LIST = ALPHA2_LIST + ALPHA3b_LIST
+
+
def language_from_stream(l):
if not l:
raise LanguageError()