From 5402c2aaaf111685ec5b3e2ad7023beccd096f16 Mon Sep 17 00:00:00 2001 From: morpheus65535 Date: Wed, 7 Feb 2024 13:51:16 -0500 Subject: Fixed opensubtitles.com filtering AI translated subtitles even when they are requested by user. #2381 --- libs/subliminal_patch/providers/opensubtitlescom.py | 7 ++++--- 1 file 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']: -- cgit v1.2.3