From 4a78f3b6b8847a3562969cde26f8cada8e2e3bf4 Mon Sep 17 00:00:00 2001 From: morpheus65535 Date: Wed, 30 Jun 2021 20:24:14 -0400 Subject: [PATCH] Fixed subdivx provider when there's a year in series directory name but not on the provider website. #1454 --- libs/subliminal_patch/providers/subdivx.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libs/subliminal_patch/providers/subdivx.py b/libs/subliminal_patch/providers/subdivx.py index dca0741d0..6bdff363b 100644 --- a/libs/subliminal_patch/providers/subdivx.py +++ b/libs/subliminal_patch/providers/subdivx.py @@ -178,9 +178,11 @@ class SubdivxSubtitlesProvider(Provider): title_soup, body_soup = title_soups[subtitle], body_soups[subtitle] # title title = self._clean_title(title_soup.find("a").text) - # filter by year - if video.year and str(video.year) not in title: - continue + # discard subtitles if a year between parenthesis is present in title and doesn't match the one provided + # in video object + if re.match(r'(\(\d{4}\))', title): + if video.year and str(video.year) not in title: + continue # Data datos = body_soup.find("div", {"id": "buscador_detalle_sub_datos"}).text