diff options
author | morpheus65535 <[email protected]> | 2022-09-28 06:28:00 -0400 |
---|---|---|
committer | morpheus65535 <[email protected]> | 2022-09-28 06:28:00 -0400 |
commit | 754fed4269c31f7663c617543813abccb140624c (patch) | |
tree | 28193acd8a853a0cea0bd18bf89983bca06c3668 | |
parent | 0309b5ce2f3d449973464768629e58325f889a72 (diff) | |
parent | c791f39e53b28f6b2e1053098bc39923ae1f7dbf (diff) | |
download | bazarr-754fed4269c31f7663c617543813abccb140624c.tar.gz bazarr-754fed4269c31f7663c617543813abccb140624c.zip |
Merge remote-tracking branch 'origin/development' into development
-rw-r--r-- | libs/subliminal_patch/providers/subdivx.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libs/subliminal_patch/providers/subdivx.py b/libs/subliminal_patch/providers/subdivx.py index be72ff052..5be08e45e 100644 --- a/libs/subliminal_patch/providers/subdivx.py +++ b/libs/subliminal_patch/providers/subdivx.py @@ -25,6 +25,7 @@ _CLEAN_TITLE_RES = [ (r"´|`", "'"), (r" {2,}", " "), ] +_SPANISH_RE = re.compile(r"españa|ib[eé]rico|castellano|gallego|castilla") _YEAR_RE = re.compile(r"(\(\d{4}\))") @@ -224,7 +225,10 @@ class SubdivxSubtitlesProvider(Provider): description = sub_details.replace(",", " ") # language - spain = "/pais/7.gif" in datos or "españa" in description.lower() + spain = ( + "/pais/7.gif" in datos + or _SPANISH_RE.search(description.lower()) is not None + ) language = Language.fromalpha2("es") if spain else Language("spa", "MX") # uploader |