summaryrefslogtreecommitdiffhomepage
path: root/libs
diff options
context:
space:
mode:
authormorpheus65535 <[email protected]>2023-03-19 20:59:44 -0400
committermorpheus65535 <[email protected]>2023-03-19 20:59:44 -0400
commit9bd2ab514e273426a0918a2c64165f0bcf9f7be3 (patch)
tree3600067dbf81274fa012420b5c3dc9a9f78cd494 /libs
parentf276b70f5edff8574ff00e2ab4ec1c11c91ba71b (diff)
downloadbazarr-9bd2ab514e273426a0918a2c64165f0bcf9f7be3.tar.gz
bazarr-9bd2ab514e273426a0918a2c64165f0bcf9f7be3.zip
Fixed HI subtitles wrongly ignored when normal or HI is selected in languages profile.v1.2.1-beta.7
Diffstat (limited to 'libs')
-rw-r--r--libs/subliminal_patch/core.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/libs/subliminal_patch/core.py b/libs/subliminal_patch/core.py
index 2950467a9..c31d5ecd0 100644
--- a/libs/subliminal_patch/core.py
+++ b/libs/subliminal_patch/core.py
@@ -473,7 +473,7 @@ class SZProviderPool(ProviderPool):
for s in subtitles:
# get the matches
- if s.language not in languages:
+ if s.language.basename not in [x.basename for x in languages]:
logger.debug("%r: Skipping, language not searched for", s)
continue
@@ -502,12 +502,12 @@ class SZProviderPool(ProviderPool):
break
# stop when all languages are downloaded
- if set(s.language for s in downloaded_subtitles) == languages:
+ if set(s.language.basename for s in downloaded_subtitles) == languages:
logger.debug('All languages downloaded')
break
# check downloaded languages
- if subtitle.language in set(s.language for s in downloaded_subtitles):
+ if subtitle.language in set(s.language.basename for s in downloaded_subtitles):
logger.debug('%r: Skipping subtitle: already downloaded', subtitle.language)
continue
@@ -1127,7 +1127,7 @@ def save_subtitles(file_path, subtitles, single=False, directory=None, chmod=Non
continue
# check language
- if subtitle.language in set(s.language for s in saved_subtitles):
+ if subtitle.language in set(s.language.basename for s in saved_subtitles):
logger.debug('Skipping subtitle %r: language already saved', subtitle)
continue