Categories database is messed up after reinstall

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

Moderators: helmut, XnTriq, xnview

Post Reply
Akir
Posts: 2
Joined: Sun Feb 22, 2015 4:55 pm

Categories database is messed up after reinstall

Post by Akir »

I have a problem with the categories DB: My Ubuntu (12.04 LTS) imploded, and I had to wipe the disk and reinstall, which I did with 14.04 LTS (I thought, while I'm at it...). After I re-installed XnViewMP and re-setup all my shortcuts to the picture collection, the categories db was messed up: Some categories seem to point to the wrong files. It might well be that I didn't recreate the identical directory/shortcut tree, and/or moved some files with Nautilus, so I suspect the problem lies there. I don't think I can (manually) find those mistakes though. Is there any way to repair the db?
I tried the method suggested here, but the MP db seems to have a slightly different format, I can't find the search string (or maybe I'm doing something wrong? I'm not that good with regex...)
Sorry in case I duplicate some post, I did search, but I might have overlooked something similar, if so please point me and I'll shut up!
Thanks in advance,
Akir
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Categories database is messed up after reinstall

Post by xnview »

If you know SQL, you can use SQLitebrowser
Pierre.
Akir
Posts: 2
Joined: Sun Feb 22, 2015 4:55 pm

Re: Categories database is messed up after reinstall

Post by Akir »

No, I don't, unfortunately.
danjcla
Posts: 49
Joined: Fri Feb 13, 2015 12:08 am

Re: Categories database is messed up after reinstall

Post by danjcla »

I think this is what you need. Just open ~/.xnviewmp/XnView.db (might be somewhere else depending on your OS; just search for the file named XnView.db) in some GUI like pierre mentioned, then go to "Execute SQL" and paste this in, then execute (in SQLiteBrowser, the play button or F5). http://sqlitebrowser.org/
~~

SELECT Label, Pathname, Filename
FROM Tags
JOIN TagsTree on TagsTree.TagID = Tags.TagID
JOIN Images on Images.ImageID = TagsTree.ImageID
JOIN Folders on Folders.FolderID = Images.FolderID
ORDER BY Label, Pathname, Filename

~~

If you click the lower right hand corner icon you can export to CSV file, and then you can open that in a spreadsheet.
danjcla
Posts: 49
Joined: Fri Feb 13, 2015 12:08 am

Re: Categories database is messed up after reinstall

Post by danjcla »

Oh also MP 0.72 search fails if using image base path might be useful to you.
Post Reply