diff options
author | morpheus65535 <[email protected]> | 2024-02-16 21:55:25 -0500 |
---|---|---|
committer | morpheus65535 <[email protected]> | 2024-02-16 21:55:25 -0500 |
commit | 43d313a31b058fbdebd4085000268e6dc3a3c03b (patch) | |
tree | 7617efc9db52e61ea15ac61a3ae3d7b9873dcfa1 | |
parent | 8ea3884f23e5e27eab77d7ed34089d5b8d6340df (diff) | |
download | bazarr-1.4.2.tar.gz bazarr-1.4.2.zip |
Fixed subdivx issue with foreign title encoding issue. #2395v1.4.2-beta.7v1.4.2
-rw-r--r-- | libs/subliminal_patch/providers/subdivx.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/libs/subliminal_patch/providers/subdivx.py b/libs/subliminal_patch/providers/subdivx.py index 3783ff33b..f72d0b667 100644 --- a/libs/subliminal_patch/providers/subdivx.py +++ b/libs/subliminal_patch/providers/subdivx.py @@ -78,12 +78,16 @@ class SubdivxSubtitle(Subtitle): # episode if isinstance(video, Episode): # already matched within provider - matches.update(["title", "series", "season", "episode", "year"]) + matches.update(["title", "series", "season", "episode"]) + if str(video.year) in self.release_info: + matches.update(["year"]) # movie elif isinstance(video, Movie): # already matched within provider - matches.update(["title", "year"]) + matches.update(["title"]) + if str(video.year) in self.release_info: + matches.update(["year"]) update_matches(matches, video, self._description) @@ -184,6 +188,10 @@ class SubdivxSubtitlesProvider(Provider): # Make the POST request response = self.session.post(search_link, data=payload) + if response.status_code == 500: + logger.debug("Error 500 (probably bad encoding of query causing issue on provider side): %s", query) + return [] + # Ensure it was successful response.raise_for_status() |