0.82: Categories: Non-selection actions & on-disk metadata

Bugs that are confirmed but cannot be fixed for some reasons.

Moderators: XnTriq, xnview, Dreamer

User avatar
m.Th.
XnThusiast
Posts: 1370
Joined: Wed Aug 16, 2006 6:31 am
Contact:

0.82: Categories: Non-selection actions & on-disk metadata

Postby m.Th. » Wed Feb 01, 2017 8:17 am

In our discussion, in Categories subsystem we distinguish a certain group of actions which are applied to the current selection. These are Add and Remove Category: select some photos, go to Categories Pane and (un)check the desired category - you will see that the said category is correctly (un)assigned both in XnView's DB and on-disk metadata (XMP sidecar and embedded metadata - if the file format supports it).

However there is an important problem with the actions in the Categories subsystem which are not directly tied with a selection: they are actions which usually are management actions directly on the Categories Pane (on tree).

These are (Right-click on the Categories Pane over the tree): Rename, Delete and Merge With... - also Edit.. can trigger a Rename.

Simple steps how to reproduce the problem:

1. In XnView MP assign the category C1 to file F1.jpg
2. Go to Windows Explorer (or any other program with similar capability) to see the file's tags. You will see that C1 is written in F1.jpg as a tag.
3. In XnView MP go to another file (eg. F2.jpg - doesn't matter)
4. Rename C1 to C2 (right-click over the Category - choose Rename...)

Expected: A confirmation message should appear and if we choose {Yes} all the files with C1 should have in the on-disk metadata the new name: C2.

Actual: Nothing happens. The files (including F1.jpg) still have on-disk the old name: C1.


Proposed solution:

An iterator class having as an argument the code to execute which will start with a DSA message saying something like "Do you want to update the on-disk metadata for the changed/deleted category?" {Yes}{No}. - ok, also, the message can be passed as an argument.

If the user will choose {Yes} then the iterator will run the code passed as an argument (RenameCatInFile, DeleteCatFromFile etc.) to each file (if the file is reachable) while a "please wait" gauge will inform us that the program executes a lengthy operation. Of course, if this can be done in a background thread it would be better.
m. Th.

The Ascetic Experience - The best photos and texts from Holy Mountain (Athos)

- Dark Themed XnViewMP 0.86 64bit & XnView 2.00 x64 on Win7 x64 -

vertigo
Posts: 107
Joined: Wed Feb 15, 2017 3:49 pm

Re: Categories: Non-selection actions & on-disk metadata

Postby vertigo » Wed Feb 22, 2017 1:43 am

I tried to reproduce this but when I view a file and its properties in Explorer after applying a category to it said category does not show in its metadata. Not sure if I'm doing something wrong.

It does seem to me, though, that in order to do what you're asking, XnView would have to keep track of all categories assigned to all files, something which would require a potentially massive database, or it would have to scan ALL files EVERYWHERE for any with that assigned category. IOW, I strongly suspect this will not be doable. But, I could be wrong.

User avatar
helmut
Posts: 8120
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Re: Categories: Non-selection actions & on-disk metadata

Postby helmut » Wed Feb 22, 2017 3:05 pm

I can confirm the problem:
When renaming a category the IPTC/XMP data in the images is not updated. As requested above, any change in the category assigment or category (delete, rename, move in hierarchy, ...) should result in an update of the images assigned to that category (assuming that updating of IPTC/IIM or XMP data is activated).

m.Th. wrote:... Expected: A confirmation message should appear and if we choose {Yes} all the files with C1 should have in the on-disk metadata the new name: C2. ...
I think the confirmation message is only needed if the updating of IPTC/IIM or XMP data is activated in the settings. In the confirmation message, it should clearly say what is going on and the number of affected files should be listed.

:arrow: Reproduced

CameronD
Posts: 286
Joined: Wed Aug 01, 2007 1:28 pm
Location: Australia

Re: Categories: Non-selection actions & on-disk metadata

Postby CameronD » Tue Mar 14, 2017 1:09 pm

vertigo wrote:I tried to reproduce this but when I view a file and its properties in Explorer after applying a category to it said category does not show in its metadata. Not sure if I'm doing something wrong.

There are settings in Browser->Metadata->IPTC&XMP tab that allow you to synchronise keywords in the metadata with the DB categories. I think by default they are disabled.
If you are referring to ms-windows explorer, then the keywords should appear under the "tags" column.

vertigo wrote:It does seem to me, though, that in order to do what you're asking, XnView would have to keep track of all categories assigned to all files, something which would require a potentially massive database.

That is exactly (part of) what the database does. The space consumed is minuscule compared to the size of an image itself.
You must not have tried the "Categories filter" tab - click on a category and it immediately lists all the files in the db that have that category.

User avatar
m.Th.
XnThusiast
Posts: 1370
Joined: Wed Aug 16, 2006 6:31 am
Contact:

Re: 0.82: Categories: Non-selection actions & on-disk metada

Postby m.Th. » Fri Mar 17, 2017 1:36 pm

Why Postponed?


There are settings in Browser->Metadata->IPTC&XMP tab that allow you to synchronise keywords in the metadata with the DB categories. I think by default they are disabled.


At least for me they are enabled.

That is exactly (part of) what the database does. The space consumed is minuscule compared to the size of an image itself.


Exactly. Finding the actual files and updating their metadata is a simple on-disk scan.
m. Th.

The Ascetic Experience - The best photos and texts from Holy Mountain (Athos)

- Dark Themed XnViewMP 0.86 64bit & XnView 2.00 x64 on Win7 x64 -

User avatar
helmut
Posts: 8120
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Re: 0.82: Categories: Non-selection actions & on-disk metada

Postby helmut » Fri Mar 17, 2017 3:05 pm

m.Th. wrote:Why Postponed?
@Pierre: Could you please explain?

User avatar
xnview
Author of XnView
Posts: 28043
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: 0.82: Categories: Non-selection actions & on-disk metada

Postby xnview » Fri Mar 17, 2017 3:42 pm

helmut wrote:
m.Th. wrote:Why Postponed?
@Pierre: Could you please explain?

For me, will be a very long process, and need a lot of work...
Pierre.

User avatar
m.Th.
XnThusiast
Posts: 1370
Joined: Wed Aug 16, 2006 6:31 am
Contact:

Re: 0.82: Categories: Non-selection actions & on-disk metada

Postby m.Th. » Sun Mar 19, 2017 11:37 am

xnview wrote:
helmut wrote:
m.Th. wrote:Why Postponed?
@Pierre: Could you please explain?

For me, will be a very long process, and need a lot of work...



You have already the code to get the files that need the change.

You can iterate them.

You can load one by one the metadata.
Change the old category with the new category.
Write the metadata block back. (this process already works for a single file)

Next file.

This causes you problems?


Also: I did it "by hand":

Steps:

1. I filtered all files with the category C1
2. Select All
3. I assigned to them "C1_New"
4. I removed from them C1

Done!

I know that it isn't the most efficient way but it works in this way.
m. Th.

The Ascetic Experience - The best photos and texts from Holy Mountain (Athos)

- Dark Themed XnViewMP 0.86 64bit & XnView 2.00 x64 on Win7 x64 -

CameronD
Posts: 286
Joined: Wed Aug 01, 2007 1:28 pm
Location: Australia

Re: 0.82: Categories: Non-selection actions & on-disk metada

Postby CameronD » Sat Mar 25, 2017 7:44 am

m.Th. wrote:...
Also: I did it "by hand":

Steps:

1. I filtered all files with the category C1
2. Select All
3. I assigned to them "C1_New"
4. I removed from them C1

Done!

I have recently been using this process, and it gives workarounds to achieve rename, delete and merge.

The trick is to remember to do the steps in the correct order.


Return to “Postponed”

Who is online

Users browsing this forum: No registered users and 1 guest