aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormorpheus65535 <[email protected]>2023-03-13 12:20:56 -0400
committermorpheus65535 <[email protected]>2023-03-13 12:20:56 -0400
commit7720d000de00545ffb0d0c53ec70212545ab886a (patch)
treeb947e2970c0d3bcf1b2aef8b4379a54a13aa6c3b
parentfb6ac47bea64c5715672e4f11be8ffc1e02e32bf (diff)
downloadbazarr-7720d000de00545ffb0d0c53ec70212545ab886a.tar.gz
bazarr-7720d000de00545ffb0d0c53ec70212545ab886a.zip
Fixed opensubtitles.com provider to prevent downloading of AI or machine translated subtitles.v1.2.1-beta.3
-rw-r--r--libs/subliminal_patch/providers/opensubtitlescom.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/libs/subliminal_patch/providers/opensubtitlescom.py b/libs/subliminal_patch/providers/opensubtitlescom.py
index a1603d822..c44f6f106 100644
--- a/libs/subliminal_patch/providers/opensubtitlescom.py
+++ b/libs/subliminal_patch/providers/opensubtitlescom.py
@@ -282,9 +282,11 @@ class OpenSubtitlesComProvider(ProviderRetryMixin, Provider):
res = self.retry(
lambda: checked(
lambda: self.session.get(self.server_url + 'subtitles',
- params=(('episode_number', self.video.episode),
+ params=(('ai_translated', 'exclude'),
+ ('episode_number', self.video.episode),
('imdb_id', imdb_id if not title_id else None),
('languages', langs.lower()),
+ ('machine_translated', 'exclude'),
('moviehash', file_hash),
('parent_feature_id', title_id if title_id else None),
('season_number', self.video.season)),
@@ -298,9 +300,11 @@ class OpenSubtitlesComProvider(ProviderRetryMixin, Provider):
res = self.retry(
lambda: checked(
lambda: self.session.get(self.server_url + 'subtitles',
- params=(('id', title_id if title_id else None),
+ params=(('ai_translated', 'exclude'),
+ ('id', title_id if title_id else None),
('imdb_id', imdb_id if not title_id else None),
('languages', langs.lower()),
+ ('machine_translated', 'exclude'),
('moviehash', file_hash)),
timeout=30),
validate_json=True,