more debug, more regex
This commit is contained in:
		
							parent
							
								
									3b1e212055
								
							
						
					
					
						commit
						50c394f33f
					
				
					 1 changed files with 4 additions and 1 deletions
				
			
		|  | @ -52,7 +52,7 @@ LANGUAGE_REGEXES = { | |||
|     'ko_KR': re.compile('한국어', re.I), | ||||
| } | ||||
| 
 | ||||
| TEXTLESS_REGEX = re.compile('(台詞|セリフ|せりふ|テキスト|文字)((な|無)し|抜き)|notext|textless', re.I) | ||||
| TEXTLESS_REGEX = re.compile('(台詞|セリフ|せりふ|テキスト|文字|文章)((な|無)し|抜き)|notext|textless', re.I) | ||||
| FXLESS_REGEX = re.compile('効果音(な|無)し', re.I) | ||||
| FRONT_COVER_REGEX = re.compile('(?<!裏)表紙(?!裏)|(?<!back[-_ ])(?<!back)cover|(?<!ura[-_ ])(?<!ura)hyou?sh?i(?![-_ ]?ura)', re.I) | ||||
| BACK_COVER_REGEX = re.compile('裏表紙|hyou?sh?i[-_ ]?ura|ura[-_ ]?hyou?sh?i', re.I) | ||||
|  | @ -453,12 +453,15 @@ class Collator: | |||
|         dirs = [src for src in srcs if src.is_dir()] | ||||
|         non_dirs = [src for src in srcs if not src.is_dir()] | ||||
|         if len(dirs) == 2 and len(descendant_files_ignore(dirs[0], self.exclude)) == len(descendant_files_ignore(dirs[1], self.exclude)): | ||||
|             debug(f'Checking for image quality references between dirs {dirs[0]} and {dirs[1]}') | ||||
|             resolution_matches = [IMAGE_RESOLUTION_REGEX.match(nname(src)) for src in dirs] | ||||
|             if all(resolution_matches): | ||||
|                 debug(f'Directory names are resolutions') | ||||
|                 pairs = [(int(m.group('x')), int(m.group('y'))) for m in resolution_matches] | ||||
|                 for i in range(2): | ||||
|                     if pairs[i][0] > pairs[1-i][0] and pairs[i][1] > pairs[1-i][1]: | ||||
|                         return self.collate_from_paths([dirs[i]] + non_dirs) | ||||
|             debug(f'Checking image quality regexes') | ||||
|             for quality in IMAGE_QUALITY_REGEXES: | ||||
|                 def a_not_b(a, b, src): | ||||
|                     if a in quality: | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue