From 3a2e380addf1c8ab4f8edbea9ffed364967e76e4 Mon Sep 17 00:00:00 2001 From: cronyakatsuki Date: Wed, 18 May 2022 21:21:23 +0200 Subject: [PATCH] Rewriten title check system. --- adl.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/adl.py b/adl.py index 94d1f0f..e00a1a2 100755 --- a/adl.py +++ b/adl.py @@ -101,11 +101,10 @@ def exit_ask(): # check for problematic title def check_title(title): - for problem in PROBLEMATIC_TITLES: - if problem == title: - title = GOOD_TITLES[PROBLEMATIC_TITLES.index( - problem)].encode('utf-8') - title = title.decode('utf-8') + if title in PROBLEMATIC_TITLES: + title = GOOD_TITLES[PROBLEMATIC_TITLES.index( + title)].encode('utf-8') + title = title.decode('utf-8') return title