From f1cbfd4be537148985b580b29accc6a935a2c72b Mon Sep 17 00:00:00 2001 From: Vitiko Date: Tue, 30 May 2023 19:25:37 -0400 Subject: [PATCH] no log: add debug call to lang-equals --- libs/subliminal_patch/core.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libs/subliminal_patch/core.py b/libs/subliminal_patch/core.py index 70e1004dc..8d6f54ff5 100644 --- a/libs/subliminal_patch/core.py +++ b/libs/subliminal_patch/core.py @@ -156,15 +156,16 @@ class _LanguageEquals(list): raise ValueError(f"Not a valid equal tuple: {item}") def translate(self, items: set): - translated = set() + translated = items.copy() for equals in self: from_, to_ = equals if to_ in items: logger.debug("Translating %s -> %s", to_, from_) translated.add(from_) - else: - translated.add(to_) + + if translated == items: + logger.debug("Nothing to translate found") return translated or items