Certain pics excluded from count when filtered

loup+digikamusers at lo-cal.org loup+digikamusers at lo-cal.org
Thu Mar 30 02:22:38 BST 2023

I have a bizarre and somewhat frustrating situation.  I am using digikam 
7.5.0, as that is what my distribution provides.

I have a set of images which are spread across many folders in my media 
library.  They are sorted into various folders based on date, and they 
span a few months.  They are organized as <Media Library 

Each image is tagged with a "Date of Import" tag, which is the date when 
I added the images to my library.

There are 843 images tagged with an import date of 2018-05-17.

However, when I click on my media library root folder and I filter based 
that import date tag (no other filters activated), I get a count of 
*830*, which is incorrect.  It is missing 13 images.  Even more bizarre, 
if I click on the year "2018" in my album hierarchy, the count is 843, 
which is correct.

I traced the issue to 13 images in a specific folder.  If I move images 
in that folder to another folder, like the day before or after, then 
they are included in the count even at the library root folder.  If I 
move images from another folder into the problem folder, they are 
removed from the root-folder count.  I tried deleting that folder and 
re-creating it, and it still has the same problem.  The problem appears 
to be isolated to this folder, and to this particular tag.

I dug into the database using sqlitebrowser (read-only mode). The only 
difference I could find between this folder all the others is in the 
"Caption" and "Collection" fields.  The "Caption" field is blank, while 
all the other albums are "NULL".  The "Collection" field is 
"Uncategorized Album", while all the other albums are "NULL" in that 
field.  I generally don't use or edit those fields in the UI - these 
albums are auto-generated when I import images into my database.

I noted that when I create a new album, the "Collection" field is set to 
"Uncategorized Album" by default. I also noted that the drop-down for 
"Collection" in the album creation and album properties dialogs has two 
blank entries before the other entries (which are things like "Friends", 
"Family", etc).  I checked a few other albums, they have the second 
blank "Collection" item selected, and this one has the first one 
selected.  Setting it to the second one appears to have no effect - the 
database still says "Uncategorized Album".  Setting it to another value 
does update the database (i.e. it now says "Party") but when I set it 
back to either of the blank entries shown in the UI, it reads 
"Uncategorized Album" again.

I suspect that maybe the database schema was updates to use 
"Uncategorized Album" instead of "NULL" at some point.  But even if 
that's true, I'm not sure how it relates to my main problem above.

Can someone help me figure this out?  I need accurate tag counts, I use 
it to make sure my media library is properly updated and managed.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/digikam-users/attachments/20230329/e939a328/attachment.htm>

More information about the Digikam-users mailing list