m.Th. wrote:Now commenting on the battlefield:
If both files are newer than the DB, then XnView cannot make any assumptions at all.
Agree. Hence XnView must ask the user.
well, I have already disagreed with myself here - automatic processing can still be possible in some cases, as in the following ...
The only sensible course now is for XnView to scan each metadata field (where there are equivalent values in the DB and in the files) and compare against the DB contents.
Here is the problem. While theoretically I agree,
practically I think that the process can be rather slow (remember that usually there bunch of files/folders imported not just one or two)
and troublesome from user's POV.
Asking for each conflicting metadata field for each one of 100 - 600 - 1000 photos is quite a challenge for the user. Also, the code can become complicated.
I think is is much less cpu effort than you think. In the case of embedded metadata , XnViewMP
already scans every newer file and automatically updates metadata in the DB. To do this it has already opened the file, read the header and then scanned through it locating the relevant bits of metadata. A string compare is a trivial addition by comparison.
There are some solutions here to consider:
Solution 1. I think that the only real solution is to ask just once: "Conflicts detected. What to take precedence? {Embedded} {Sidecar} {Cancel Import of metadata}"
Solution 2. Make a list of conflicts (which will grow up very quickly) and show it... ..
I agree solution 2 is probably unworkable in its full scope, but solution 1 is next to useless in most situations I am envisaging.
To get back to overview mode: the second part of this thread is concerned with setting out the user's desired workflow for handling metadata.
I regard these sorts of situations that you and I are discussing as anomalous - they are
not everyday workflow. I think it would be very rare that hundreds of files are affected in a way that cannot automatically be resolved.
I image the situation could arise in a number of ways:
- where (new) software behaves in a way that is not expected (or it has a bug),
- another user operates in a way that conflicts with your chosen workflow,
- other software cannot be made to operate in a way you desire.
The problem with solution 1 is that it only will work in the 3rd situation.
In the other cases, especially the 2nd, it is most likely that the person facing the choice
does not know what the correct answer should be.
Here's a suggestion to an extension to options for solution 1...
There are <insert number here> images with ambiguous/conflicting metadata:
- Automatically assign precedence to sidecar/embedded (this covers the 3rd situation where the user knows what the issue is)
- Automatically resolve as much as possible by scanning and comparing (as I suggested) and return to this window.
- manually review each conflict and allow me to resolve them one at a time. (this is for the user who has no idea what has gone wrong)
I think automatic scan/compare/resolve should be done first when there are fewer than
<n> uncertain files in a folder. If
<n> is a settable option then user can choose 0 to 1000 according to preferences.
I do not really care how crudely the last option is done. After all, I expect it will be a rare event, but one that comes as a surprise to the user.
One possibility might be in browser mode - highlight any files with unresolvable date conflicts, and highlight fields that do not compare equal when the file is selected.
After all, XnView always has to read the file and metadata to display a lot of the contents that are not in the DB.