Summary: | Negative XMP ratings show as 1 | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | kdebugs |
Component: | Tags-Rating | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | caulier.gilles, metzpinguin |
Priority: | NOR | ||
Version: | 7.3.0 | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: | Sample XMP |
Description
kdebugs
2021-08-24 19:45:54 UTC
can you share a file sample plus side car processed with a -1 rating, please... Gilles Caulier digiKam does not import a "-1" rating as a "1" rating. The rating will come from another metadata tag, because digiKam knows 5 other possible tags for the rating. Go to the advanced metadata settings and deactivate all metadata tags that are not relevant to you. The problem is rather programs that only change one metadata tag and leave others unchanged. Problems then inevitably arise with other programs, and there is also a mix of metadata in the images. When you have made the change, you must also temporarily activate the setting to clean up the database (metadata settings) so that the "1" rating is also deleted when the images are read in again. If you upload a sample, we need the image + sidecar. Maik Created attachment 141037 [details] Sample XMP I've attached a sample XMP. The original file is a DNG file so too large to attach. However the bug isn't what I thought it was. It isn't that Digikam maps -1 to 1, it's that Digikam falsely treats -1 as invalid and ignores it completely. When I did as suggested and turned on database cleanup and checked my advanced metadata settings for ratings, then rescanned, Digikam cleared the rating from the image entirely. I went digging through the code and found this code responsible for actually reading the rating: https://invent.kde.org/graphics/digikam/-/blob/master/core/libs/metadataengine/dmetadata/dmetadata_labels.cpp#L163-263 This shows that Digikam improperly treats a rating of -1 exactly the same as no rating being found at all. I also found a "convertRatio" referenced around the codebase that seems to be a map of numbers to stars. The size of this array is 6 items, with the first number corresponding to 0 stars and the last to 5 stars. I'm not sure what to do about the problem. Should another index be added to convertRatio for negative ratings and the UI updated (maybe with a cross or something for rejected)? If the contribution would be welcome I think I could take a stab at it. Yes, that is correct, digiKam does not currently support a negative rating. A long time ago I made a patch with basic support for negative ratings. I use a horizontal line through all stars for negative ratings. I know that the value -1 is described in the standard, personally I don't think it's good for the rating idea. Maik *** This bug has been marked as a duplicate of bug 367896 *** |