Rebuilding the Category Database

Ask for help and post your question on how to use XnView MP.

Moderators: XnTriq, xnview

Post Reply
goldensword52
Posts: 2
Joined: Sat Aug 08, 2015 3:40 pm

Rebuilding the Category Database

Post by goldensword52 » Tue Nov 10, 2015 5:34 pm

Hi everyone, I'm having a bit of trouble with XnViewMP's category feature, and I'm hoping you can help me out. In the categories pane, under the dropdown menu, under the "Categories Management" section, I used "Export Categories File" to save a copy of my category layout. I then used Clear all..." to remove the current categories, followed by "Import Categories File" which successfully restored my categories.

Here is the issue though: Although my category structure is perfectly intact, XnView MP now doesn't recognize which photos belong to which categories. I've checked the EXIF, IPTC-IIM, and XMP metadata, and they all still have the correct categories listed for each of my files. So I assume I just need to tell XnViewMP to go back through my photos and read the category metadata again.

I've checked the settings menu, the wiki, and the forums, but so far I haven't found any advice on how I can do something like that. So if anyone here knows, or can off some other helpful advice, I would be very grateful. Thanks in advance!

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

Re: Rebuilding the Category Database

Post by CameronD » Wed Nov 11, 2015 6:24 am

First check your settings: Metadata->IPTC&XMP to ensure category import and export have been ticked.
If you have not always been exporting Category, and also create XMP and IPTC if needed then you have lost some or all data.

Also check the rating and color label options.

If you have saved all catalog metadata to the image file then it might be safe to delete the DB file and start again. I have found this is the fastest way in the past, but maybe my DB usage was different. (obviously, save a copy first)

Otherwise you need to trigger the program to update files, which seems to be based on comparing a date stored in the DB for each file, and comparing with the filesystem's "last modified" timestamp. You could try sql code to reset the relevant date in the DB to a very old value.

Or manually go through every folder, select all, then view->update catalog from files to force a refresh.

Yes, none of the methods is very convenient.

krzfx
Posts: 1
Joined: Sun Dec 17, 2017 8:41 pm

Re: Rebuilding the Category Database

Post by krzfx » Sun Dec 17, 2017 8:59 pm

Hi, I have used Picasa until now and think about switching to XNVIEWMP.
I really enjoyed the Picasa Feature that IPTC-Data was automatically imported out of a picture into the Picasa database when adding a picture to the Picasa database. If you edit IPTC-Values of a picture using a programm other than Picasa, Picasa would imediately renew its database information about this picture an you could use the search-function to search in IPTC-data of all your picture library.
I can't get this working with XnViewMP, what am I doing wrong?

Do I really Need to select a Picture in XnViewMP to use the function "view->update catalog from files" ?
Isn't it possible to do this for ALL pictures of my library at one (without deleting the XnViewMP-Database)

michel038
Posts: 166
Joined: Tue Sep 27, 2016 8:18 am
Location: France

Re: Rebuilding the Category Database

Post by michel038 » Sun Dec 17, 2017 10:10 pm

I did a lot of tests with xnviewmp...
When I want to clean database,
1) backup categories in a text file
2) Backup files-categories in a xml file
3) delete all categories
4) close xnviewmp, rename xnview.db as xnview.db.old , restart.
5) import categories (text file)
6) Sometimes, I use " import file categories xml file" if previous database had a good behaviour. Sometimes, I ask xnviewmp to read the whole set of images (about 30000) , that takes half an hour, but the database is completely renewed. For this purpose, use Tools, settings, catalog, add folder (select root folder containing all images)
First check your settings: Metadata->IPTC&XMP to ensure category import and export have been ticked.
I use only the first one "import", because it occured that keywords were read two times if "export" option was also enabled ...
When importation is ended, I remove mark in "import" , and enable "export" for categories be written in keywords

Yes; Picasa detects if a metadata was modified, but Xnviewmp doesn't.
You have to update metadata only in xnviewmp, or delete / add directories with Tools, settings, catalog, delete/add folder (and tick import option)

Post Reply