Compare commits

...

2 Commits

1 changed files with 5 additions and 2 deletions

View File

@ -36,8 +36,8 @@ FANZA_ID_REGEX = re.compile('^d_[0-9]+$')
FAKKU_ID_REGEX = re.compile('.*_FAKKU$')
HI_RES_REGEX = re.compile('高解像度|原寸|大サイズ', re.I)
NO_TONE_REGEX = re.compile('トーン(効果)?[な無]し|グレースケール', re.I)
TONE_REGEX = re.compile('トーン(版|(効果)?[有あ]り)', re.I)
NO_TONE_REGEX = re.compile('トーン(効果)?[な無]し|グレー?スケ', re.I)
TONE_REGEX = re.compile('トーン($|版|(効果)?[有あ]り)', re.I)
COLOR_REGEX = re.compile('カラー', re.I)
MONOCHROME_REGEX = re.compile('モノクロ', re.I)
MOSAIC_REGEX = re.compile('モザイク', re.I)
@ -476,6 +476,9 @@ class Collator:
return not quality[b].search(nname(src))
better_dirs = [src for src in dirs if a_not_b('better', 'worse', src)]
worse_dirs = [src for src in dirs if a_not_b('worse', 'better', src)]
debug('Regex results')
debug(f'Better: {better_dirs}')
debug(f'Worse: {worse_dirs}')
if len(better_dirs) == 1 and len(worse_dirs) == 1 and better_dirs[0] != worse_dirs[0]:
return self.collate_from_paths(better_dirs + non_dirs)