Bug 509374 - Rating is not stored to all filetypes
Summary: Rating is not stored to all filetypes
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Metadata-Engine (other bugs)
Version First Reported In: 8.6.0
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-09-11 08:54 UTC by Marcus Hardt
Modified: 2025-12-25 10:55 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 9.0.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcus Hardt 2025-09-11 08:54:41 UTC
SUMMARY
Writing metadata to files (i.e. via Album->Write-Metadata...) does not work in all circumstances with different filetypes. Once I (manually) refresh (i.e. via Album->Read-Metadata...) at least my ratings are gone.

Initially it did only work with image files, but not with Video (mp4) and sound (ogg). When I changed the settings "Reading and Writing Metadata" -> exiftool for reading and "delegate to exiftool [..] for writing" it worked at least for the mp4 files.

In my case I'm only trying to do this for the five-star-rating. I understand that  whichever backend one chooses, not all file formats can be supported. So the GUI should either not try writing, or not accept empty reads as a zero rating. Maybe having a list of filetypes where reading is known to work could help in only overwriting ratings that make sense.


STEPS TO REPRODUCE
1. Rate an image, a video and a sound file with two stars.
2. Menu: Albums -> Write Metadata to files
3. Menu: Albums -> Read Metadata from files

OBSERVED RESULT
Only the rating of the image is still there


EXPECTED RESULT
All the ratings should be there


SOFTWARE/OS VERSIONS
Debian / testing

> (available in the Info Center app, or by running `kinfo` in a terminal window)
I have no kinfo on my system.
Linux/KDE Plasma: I have no plasma / kde on my system
Qt Version: 6.8.2+dfsg-9
Comment 1 Maik Qualmann 2025-09-11 10:36:29 UTC
This isn't a bug; enabling ExifTool allows many more file types to write metadata. But ExifTool also has its limitations, including OGG.
You can find out which file types ExifTool can only read but not write in the digiKam Metadata Settings in the ExifTool tab.
If ExifTool can't do this, there's currently no way to change the metadata for that file.

The alternative would be to use XMP sidecars. There's nothing we can do here.

Maik
Comment 2 Maik Qualmann 2025-09-11 10:58:05 UTC
One more note: writing the metadata is not necessary after setting a rating; digiKam has already written the metadata.
Rereading the metadata is not necessary either, as digiKam keeps everything in sync. A reread cleans up the database if the corresponding metadata write option is enabled. Normally, digiKam performs a "smart" read of the metadata in the background when changes occur, ignoring a 0 rating if a rating exists in the database.

Otherwise, the sidecar for read-only files (this also includes file types whose metadata cannot be written) is the right option for you.

Maik
Comment 3 Marcus Hardt 2025-09-11 19:37:35 UTC
My last comment got lost. I thought it might make sense for digikam to read-after-write to detect missing writes.

But as you pointed out, I just found the box to enable re-loading of changed files. This addresses my actual problem, so I don't need to manually reread all metadata from all files anymore.

Thanks!
M.