ermig1979 / AntiDupl

A program to search similar and defect pictures on the disk
https://ermig1979.github.io/AntiDupl
MIT License
1.23k stars 92 forks source link

Enhancement: add an alternative search logic #188

Open sykledust opened 4 months ago

sykledust commented 4 months ago

I've just started using this program, and it is really good! Thank you!

However, I would like to suggest the following enhancements to the search logic: Only compare images from one path of search with one another.

This is kind of the opposite of the existing option "Compare images from one path of search with one another" (correct me if I'm wrong, but as I've understood it, checking this option allows searching for duplicates/similars within one (of the) path(s), if unchecked the program will only compare images in one path with images in the other paths).

I sometimes have multiple folders, each with a set of images where there may be duplicates, but I know that there won't be any duplicates "across folders" (only within each one). This can of course be accomplished per now by the following two (sub-optimal) strategies: a) search each folder separately (caveat: very time-consuming if there are many folders; is it possible to accomplish this more effectively, say using CLI?) b) in the case that all/multiple folders resides within a single "root" directory: search all the folders with the option "compare images inside one directory" (caveat: a lot of unnecessary comparisons are performed, so slower than it needs to be) For this feature to be more efficient than a), it is necessary to be able to add search paths (ie. multiple folders) more efficiently in the paths dialogue. If it is possible to select multiple folders at once in the "Select folder" window would be one way to solve it. If that is not possible within the framework, perhaps adding a new button that adds all the subdirectories (immediately) below a "root directory" (which is selected by the "select folder" window) would be possible?

dec-mail commented 4 months ago

by the time you finished, i lost the whole idea irt was so convoluted; but it is MY understand that your 1st premise is wrong.

the AP option you mention compares files in one path/foder only to files in a 21nd path/folder

sykledust commented 4 months ago

I'm sorry that my suggestion came out somewhat convoluted, I think I tried to cover too much of the rationale and other necessary aspects in one post, I'll try a different, and hopefully more understandable, approach:

Say you have three folders in the list of search paths, call them dirA, dirB and dirC. Call the option "Compare images from one path of search with one another" opt1, then my understanding is the following:

1) If opt1 is unchecked then

I think this is also what @dec-mail says. What I suggest is another, complementary option, call it opt2, that I phrased along the same lines as opt1, namely: Only compare images from one path of search with one another. This opt2 would be complementary to opt1, meaning that it would not make sense to allow both to be checked/active at the same time. In other words: both opt1 and opt2 may be inactive (behavior as in 1) above); opt1 is active and opt2 unactive (behavior as in 2) above); opt1 is unactive and opt2 active (behavior 3) described below).

3) If opt2 is checked then

I hope this makes the suggestion clear, and if so, I can elaborate around the rationale and other aspect later :)