Skip to content

Commit 9147046

Browse files
committed
dedupe
1 parent 57854bf commit 9147046

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

xklb/media/dedupe.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -379,10 +379,11 @@ def get_fs_duplicates(args) -> List[dict]:
379379
for m in media:
380380
if m['path'] == path:
381381
if hash is None:
382-
del m
382+
media = [ d for d in media if d['path'] != m['path'] ]
383383
else:
384384
m['hash'] = hash
385385
args.db["media"].upsert(m, pk=["path"], alter=True) # save sample-hash back to db
386+
break
386387

387388
sample_hash_groups = defaultdict(list)
388389
for m in media:

0 commit comments

Comments
 (0)