This repository has been archived by the owner on Feb 19, 2022. It is now read-only.
optionally keep image extension in XMP sidecar file names #6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Many programs (Capture One Pro, Lightroom (I believe), and others) construct the XMP sidecar file name without the image file name extension, replacing it with 'xmp'. digiKam (and several others, like darktable) instead append '.xmp' to the full image file name, including the original extension.
There are pros and cons to both approaches.
The changes in this commit make it configurable to keep the image extension or not in the file name when constructing an XMP sidecar file name.
A checkbox (defaults to checked) "Keep Image Extension in XMP Sidecar Name" was added to Settings > Configure digiKam > Metadata > Sidecars.
Some references:
https://bugs.kde.org/show_bug.cgi?id=264007
https://photo.stackexchange.com/questions/86830/digikam-metadata-in-xmp-sidecarfiles-using-myphoto-xmp-instead-of-myphoto-jpg-xm
https://mail.kde.org/pipermail/digikam-users/2012-June/016381.html
https://mail.kde.org/pipermail/digikam-devel/2013-January/065996.html
https://discuss.pixls.us/t/linux-applications-and-their-non-standard-xmp-sidecar-naming-convention/2688
Note:
Because the member functions involved in MetaEngine are static, I access the setting using the MetadataSettings singleton. This is not the current behaviour in MetaEngine with other settings, but I think this is a good way to accomplish the goal. An alternative would be to make the functions non-static, but my guess is that it would involve quite a bit of refactoring. (And I'm not sure why the settings are currently being copied into MetaEngine, when they could just be accessed using the MetadataSettings singleton...)