diff options
Diffstat (limited to 'custom_libs/subliminal_patch/providers/subf2m.py')
-rw-r--r-- | custom_libs/subliminal_patch/providers/subf2m.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/custom_libs/subliminal_patch/providers/subf2m.py b/custom_libs/subliminal_patch/providers/subf2m.py index 6b3a59129..1ac0b4048 100644 --- a/custom_libs/subliminal_patch/providers/subf2m.py +++ b/custom_libs/subliminal_patch/providers/subf2m.py @@ -132,9 +132,9 @@ _DEFAULT_HEADERS = { class Subf2mProvider(Provider): provider_name = "subf2m" - _movie_title_regex = re.compile(r"^(.+?)( \((\d{4})\))?$") + _movie_title_regex = re.compile(r"^(.+?)(\s+\((\d{4})\))?$") _tv_show_title_regex = re.compile( - r"^(.+?) [-\(]\s?(.*?) (season|series)\)?( \((\d{4})\))?$" + r"^(.+?)\s+[-\(]\s?(.*?)\s+(season|series)\)?(\s+\((\d{4})\))?$" ) _tv_show_title_alt_regex = re.compile(r"(.+)\s(\d{1,2})(?:\s|$)") _supported_languages = {} @@ -220,7 +220,7 @@ class Subf2mProvider(Provider): results = [] for result in self._gen_results(title): - text = result.text.lower() + text = result.text.strip().lower() match = self._movie_title_regex.match(text) if not match: continue @@ -254,7 +254,7 @@ class Subf2mProvider(Provider): results = [] for result in self._gen_results(title): - text = result.text.lower() + text = result.text.strip().lower() match = self._tv_show_title_regex.match(text) if not match: |