From 51243aca6e087ed25b30d2e832f488cf7d80b891 Mon Sep 17 00:00:00 2001 From: xenofem Date: Wed, 7 Feb 2024 17:12:02 -0500 Subject: [PATCH] add more textless regex, fix bug in alphabetized uniqueness checker --- dlibrary/dlibrary.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlibrary/dlibrary.py b/dlibrary/dlibrary.py index 02371dc..189fde7 100755 --- a/dlibrary/dlibrary.py +++ b/dlibrary/dlibrary.py @@ -26,7 +26,7 @@ DLSITE_ID_REGEX = re.compile('^[BR]J[0-9]+$') FANZA_ID_REGEX = re.compile('^d_[0-9]+$') FAKKU_ID_REGEX = re.compile('.*_FAKKU$') -TEXTLESS_REGEX = re.compile('(台詞|セリフ)(な|無)し|notext|textless') +TEXTLESS_REGEX = re.compile('(台詞|セリフ|テキスト|文字)(な|無)し|notext|textless') EPILOGUE_REGEX = re.compile('after|後日談') ALT_VERSIONS = [ '褐色', @@ -310,7 +310,7 @@ def alphabetic_numbering(entries, start_point): if len(ending) > 1: return None index = 0 if ending == '' else ord(ending.lower()) - ord('a') - if index in alphabetized: + if (index,) in alphabetized: return None alphabetized[(index,)] = [entry] indices = list(alphabetized.keys())