diff --git a/subliminal/providers/opensubtitlescom.py b/subliminal/providers/opensubtitlescom.py index 22a60659..493ef411 100644 --- a/subliminal/providers/opensubtitlescom.py +++ b/subliminal/providers/opensubtitlescom.py @@ -697,7 +697,8 @@ def query( ) # Some criteria are redundant, so skip duplicates - unique_ids = [s.id for s in subtitles] + # Use set for faster search + unique_ids = {s.id for s in subtitles} if subtitle.id not in unique_ids: logger.debug('Found subtitle %r', subtitle) subtitles.append(subtitle)