elisemercury / Duplicate-Image-Finder

difPy - Python package for finding duplicate or similar images within folders
https://difpy.readthedocs.io
MIT License
420 stars 65 forks source link

search.delete() always fails (even with matches); nested search.lower_quality dictionary #78

Closed ScrambledRK closed 9 months ago

ScrambledRK commented 9 months ago

Hello!

I noticed that delete always fails even though stats and result show matching files. This is because the lower_quality dictionary ends up nested somehow.

The workaround is to correct that nesting before calling delete.

dif = difPy.build(some_directory)
search = difPy.search(dif)

search.lower_quality = search.lower_quality["lower_quality"]  # the workaround

search.delete(silent_del=True)

I hope to find the time to contribute a fix, but maybe its a trivial fix for some of you? Anyway, thanks for this well written and awesome library!

elisemercury commented 9 months ago

Hi @ScrambledRK ,

Thanks a lot for flagging this! Indeed, this should not be the case and will be fixed in the upcoming difPy update.

Thanks again and best, Elise

elisemercury commented 9 months ago

Hi @ScrambledRK,

This issue has been fixed with difPy v4.0.1. Thanks again for flagging this!

Best, Elise