ermig1979/AntiDupl

Enhancement: add an alternative search logic

Opened this issue · 2 comments

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?

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

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

    • images in dirA will be compared to images in both dirB and in dirC, but not with each other (ie. other images in dirA)
    • images in dirB will be compared to images in both dirA and in dirC, but not with each other
    • images in dirC will be compared to images in both dirB and in dirA, but not with each other
  2. If opt1 is checked then

    • images in dirA will be compared to images in both dirB and in dirC, and in addition (each image in dirA will be) compared to other images in dirA (which ones depend further on the option "compare images inside one directory")
    • images in dirB will be compared to images in both dirA and in dirC, and in addition (each image in dirB will be) compared to other images in dirB
    • images in dirC will be compared to images in both dirB and in dirA, and in addition (each image in dirC will be) compared to other images in dirC

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).

  1. If opt2 is checked then
    • images in dirA will not be compared to images in neither dirB nor in dirC, only compared to other images in dirA
    • images in dirB will not be compared to images in neither dirA nor in dirC, only compared to other images in dirB
    • images in dirC will not be compared to images in neither dirB nor in dirA, only compared to other images in dirC

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