[Digikam-devel] excluding files from database?

Marcel Wiesweg marcel.wiesweg at gmx.de
Mon Apr 30 18:43:51 BST 2007


> > Yes sure it can be done. I will try to find an elegant solution...
>
> Just wondering: couldn't one just completely ignore files
> whose (lower-case) extension is not included in any of
> the listed Mime Types?
> This would be possible already now and imply no change
> in the database.
>
> Only for files which are already in the database
> (and not listed in the Mime Types) it would mean that
> they just stay in the database
> (which would be no real problem, I think ...)
>
> Maybe one could write a simple clean-up script
> to remove them from the data-base
> (if the above makes sense I could give this a try;
> it shouldn't be really difficult ...)

In the current situation, any file is inserted in the DB, and only when 
reading from the db, files are filtered by filename.
It is of course easy to do the filtering when inserting into the DB. After the 
initial scanning at startup, new files will be added and files which do no 
longer belong to the mime type list are removed. This also solves the problem 
with wrong album high/low/mean dates.

I see one major problem here:
A user might by chance or misunderstanding remove e.g. ".jpg" from the 
mimetype list. Suddely all his photos are gone, which is no problem they can 
be rescanned. But all tags and ratings are lost!! (unless written to file - 
assume it is not).

We need to prevent this.
One possibility is a hardcoded list of image formats that are supported. I 
cannot see any indication for removing .jpg from the mime type list.
Hm difficult. A positive list of added formats, a negative list? Or keep it as 
it is, develop another approach?

Marcel

>
> Best, Arnd



More information about the Digikam-devel mailing list