[Digikam-users] clear deprecated file entries from database

Remco Viƫtor remco.vietor at wanadoo.fr
Mon Aug 11 17:55:31 BST 2014


On Monday 11 August 2014 18:18:07 Sebastian Straub wrote:
> Hi there,
> 
> I'm quite new to digiKam, but this one is bugging me and I couldn't
> find an answer in the archives...
> 
> Sometimes I have to make changes to files that are indexed by digiKam,
> using a regular file browser. On next start, digiKam recognizes these
> changes, scans new folders and removes nonexisting images and folders
> from the album view.
> 
> But it seems like the actual database entries are not touched in this
> process. When there were face tags attached to the deleted images,
> they are still visible in the people-browser, including all their
> metadata, but with an empty thumbnail, linking to a blank picture.
> Even worse, the deleted images break the tag browser (at least in the
> Tumbnail-View), as some of the deleted images do disappear, but they
> still leave some blank space. There are more images after that (I can
> see the title of the next album), but I can't scroll down (there is no
> scrollbar).
> 
> So, is there a way to remove deprecated entries from the database,
> sync the database entries with the file system? I expected to find a
> function like that under tools -> maintenance, but "scan for new
> items" or "sync metadata and database" didn't change the situation.
> 
> I really don't want to rebuild the entire database each time I change
> something from outside digiKam; some help would be greatly appreciated!
> 
> best regards
> Sebastian
> _______________________________________________
> Digikam-users mailing list
> Digikam-users at kde.org
> https://mail.kde.org/mailman/listinfo/digikam-users
> 

Not quite exactly what you ask for, but it might do the trick:
(NOTE: do teh folowing while digikam is NOT running)

First, check the database integrity:

# sqlite3 -line digikam4.db 'pragma integrity\_check;'

# sqlite3 -line thumbnails-digikam.db 'pragma integrity\_check;'

This should pass w/o errors.

 

After that, the databases can be optimised/compacted with

# sqlite3 -line digikam4.db 'vacuum;'

# sqlite3 -line thumbnails-digikam.db 'vacuum;'

 

This should remove the deleted entries, and it should be followed by 
another integrity check.


And of course the DBs should be backed up beforehand.

Hope this helps,

Remco



More information about the Digikam-users mailing list