镜像自地址
https://github.com/arsenetar/dupeguru.git
已同步 2025-09-11 17:58:17 +00:00
[#36 state:fixed] Don't add pictures to dimensions2pictures if they don't have a cache_id (and moved some code around).
--HG-- extra : convert_revision : svn%3Ac306627e-7827-47d3-bdf0-9a457c9553a1/trunk%4087
这个提交包含在:
父节点
de178a5aba
当前提交
fa66bea92f
@ -95,14 +95,15 @@ class AsyncMatchFactory(MatchFactory):
|
|||||||
cache = self.cached_blocks
|
cache = self.cached_blocks
|
||||||
id2picture = {}
|
id2picture = {}
|
||||||
dimensions2pictures = defaultdict(set)
|
dimensions2pictures = defaultdict(set)
|
||||||
for picture in pictures[:]:
|
for picture in pictures:
|
||||||
try:
|
try:
|
||||||
picture.cache_id = cache.get_id(picture.unicode_path)
|
picture.cache_id = cache.get_id(picture.unicode_path)
|
||||||
id2picture[picture.cache_id] = picture
|
id2picture[picture.cache_id] = picture
|
||||||
except ValueError:
|
|
||||||
pictures.remove(picture)
|
|
||||||
if not self.match_scaled:
|
if not self.match_scaled:
|
||||||
dimensions2pictures[picture.dimensions].add(picture)
|
dimensions2pictures[picture.dimensions].add(picture)
|
||||||
|
except ValueError:
|
||||||
|
pass
|
||||||
|
pictures = [p for p in pictures if hasattr(p, 'cache_id')]
|
||||||
pool = multiprocessing.Pool()
|
pool = multiprocessing.Pool()
|
||||||
async_results = []
|
async_results = []
|
||||||
pictures_copy = set(pictures)
|
pictures_copy = set(pictures)
|
||||||
|
正在加载...
x
在新工单中引用
屏蔽一个用户