summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormorpheus65535 <[email protected]>2024-02-07 13:51:16 -0500
committermorpheus65535 <[email protected]>2024-02-07 13:51:16 -0500
commit5402c2aaaf111685ec5b3e2ad7023beccd096f16 (patch)
tree81d99df670c3205d29c6de69dc960d8857e5300b
parent4029c9f712b7718eca89c5dd2e4d29c3f5b2762e (diff)
downloadbazarr-5402c2aaaf111685ec5b3e2ad7023beccd096f16.tar.gz
bazarr-5402c2aaaf111685ec5b3e2ad7023beccd096f16.zip
Fixed opensubtitles.com filtering AI translated subtitles even when they are requested by user. #2381v1.4.2-beta.0
-rw-r--r--libs/subliminal_patch/providers/opensubtitlescom.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/libs/subliminal_patch/providers/opensubtitlescom.py b/libs/subliminal_patch/providers/opensubtitlescom.py
index 2e6ab6a0c..e51e5cb12 100644
--- a/libs/subliminal_patch/providers/opensubtitlescom.py
+++ b/libs/subliminal_patch/providers/opensubtitlescom.py
@@ -349,9 +349,10 @@ class OpenSubtitlesComProvider(ProviderRetryMixin, Provider):
if len(result['data']):
for item in result['data']:
# ignore AI translated subtitles
- if 'ai_translated' in item['attributes'] and item['attributes']['ai_translated']:
- logger.debug("Skipping AI translated subtitles")
- continue
+ if not self.include_ai_translated:
+ if 'ai_translated' in item['attributes'] and item['attributes']['ai_translated']:
+ logger.debug("Skipping AI translated subtitles")
+ continue
# ignore machine translated subtitles
if 'machine_translated' in item['attributes'] and item['attributes']['machine_translated']: