Skip to content

Commit

Permalink
Fixed issue when whisper returns more than one subtitle for language …
Browse files Browse the repository at this point in the history
…profiles with more than one language #2758
  • Loading branch information
JaiZed authored Nov 15, 2024
1 parent 62f345b commit d67477a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion custom_libs/subliminal_patch/providers/whisperai.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,10 @@ def __init__(self, language, video):

@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()
Expand Down

0 comments on commit d67477a

Please sign in to comment.