aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJayZed <[email protected]>2024-11-15 16:42:59 -0500
committerGitHub <[email protected]>2024-11-15 16:42:59 -0500
commitd67477aded7de5948d2156e2a2e4c83897c08f81 (patch)
tree9ec5364b062d116e7a7f89f3c10792d4af83e0ca
parent62f345bffeb2b805997bd83f8f49cd3b3a8cadae (diff)
downloadbazarr-d67477aded7de5948d2156e2a2e4c83897c08f81.tar.gz
bazarr-d67477aded7de5948d2156e2a2e4c83897c08f81.zip
Fixed issue when whisper returns more than one subtitle for language profiles with more than one language #2758v1.4.6-beta.17
-rw-r--r--custom_libs/subliminal_patch/providers/whisperai.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/custom_libs/subliminal_patch/providers/whisperai.py b/custom_libs/subliminal_patch/providers/whisperai.py
index 4b3fa466c..73d259e84 100644
--- a/custom_libs/subliminal_patch/providers/whisperai.py
+++ b/custom_libs/subliminal_patch/providers/whisperai.py
@@ -207,7 +207,10 @@ class WhisperAISubtitle(Subtitle):
@property
def id(self):
- return self.video.original_name
+ # Construct unique id otherwise provider pool will think
+ # subtitles are all the same and drop all except the first one
+ # This is important for language profiles with more than one language
+ return f"{self.video.original_name}_{self.task}_{str(self.language)}"
def get_matches(self, video):
matches = set()