summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormorpheus65535 <[email protected]>2021-06-30 20:24:14 -0400
committermorpheus65535 <[email protected]>2021-06-30 20:24:14 -0400
commit4a78f3b6b8847a3562969cde26f8cada8e2e3bf4 (patch)
tree423c911b7ed81cca92a0ba05256dfad5278b436d
parent9b3e91eee2290d9ae546a201fa35149b9b617180 (diff)
downloadbazarr-4a78f3b6b8847a3562969cde26f8cada8e2e3bf4.tar.gz
bazarr-4a78f3b6b8847a3562969cde26f8cada8e2e3bf4.zip
Fixed subdivx provider when there's a year in series directory name but not on the provider website. #1454
-rw-r--r--libs/subliminal_patch/providers/subdivx.py8
1 files 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