Version: 2.0.0 (using KDE 4.6.3) OS: Linux I am using digikam 2.0.0, beta5, compiled from source. I have changed the default digikam settings to enable 'Read metadata from XML sidecar files' and change 'Metadata writing mode' to 'Write to XMP sidecar only' From the main album view, if I now select an image and then use the menu 'Image -> Metadata -> Edit Metadata', it does not populate the dialog with metadata from any existing XMP sidecar file. If I make metadata changes and then apply them, they are saved directly into the image file and no XMP sidecar is created. In essence, changes to the 'Read metadata from XMP sidecar' and 'Metadata writing mode' settings have no effect on the metadata dialog at all. Reproducible: Always Steps to Reproduce: 1. Open menu 'Settings' -> 'Configure Digikam' 2. Select the 'Metadata' settings page 3. Enable 'Read metadata from XMP sidecar' 4. Change 'Metadata writing mode' to 'Write to XMP sidecar only' 5. Press OK to apply settings & close dialog 6. Select an image which has an XMP sidecar file with 'Headline' field set 7. Open menu 'Image -> Metadata -> Edit All Metadata' 8. Switch to 'Edit XMP' tab 8. Look at existing metadata that is loaded for 'Headline' 9. Make a change to the 'Headline' 10. Press 'Apply' Actual Results: In step 8, the 'headline' field is not populated with data from the XMP sidecar. In step 10, the change is written directly into the JPG file, and the XMP sidecar is unchanged. If there was no existing XMP sidecar in step 10, none is created either. Expected Results: In step 8, the 'headline' contains the data from the XMP sidecar In step 10, an XMP sidecar file should be created, or the existing one updated. No change must be made to the original JPG (as per 'Metadata writing mode' setting changed made earlier)
Created attachment 60270 [details] Fix kipi-plugins to load digikam settings before load/save of metadata via KExiv2 Debugging the code revealed that the use of the KExiv2 class in extra/kipi-plugins/metadataedit/ was incorrect. Some places did not apply any of the Digikam settings for metadata usage, and others only applied the WriteMetadataUpdateFiletimeStamp & WriteMetadataToRAW settings. The usage pattern of KExiv2 seems rather error-prone, requiring every piece of code to remember to manually load digikam metadata settings into the object instance. I wasn't sure of the history and/plans for improving this, so rather than re-factor it myself, I'm providing a minimal patch which simply follows the current coding practice. Specifically the patch just updates all code in extra/kipi-plugins/metadataedit/ to apply WriteMetadataToRAW, MetadataWritingMode, UseXMPSidecar4Reading and WriteMetadataUpdateFiletimeStamp. In my testing, this makes the 'Edit All Metadata' dialog correctly handle XMP sidecars as per digikam settings. Some of the kipi-plugins look like they might also need work in this area though.
Thanks Daniel for your patch... As MetadataEdit plugin is not alone to play with digiKam kipi host settings about metadata, i recommend to create in libkipiplugins a small metadatasettings container common to all plugins with a method to setup all KExiv2 configuration from a kipi interface. This will limit duplicate code everywhere. Gilles Caulier
Daniel, Do you see my comment #2 ? Can you update your patch against git/master ? Gilles Caulier
Official Kipi-plugins 2.6.0 release is out since few days now : http://www.digikam.org/drupal/node/656 Please, check if this entry still valid, or update report accordingly. Thanks in advance. Gilles Caulier
patching file utilities/scripts/cleanup_digikamdb/cleanup_digikamdb.1 patching file utilities/scripts/digitaglinktree/digitaglinktree.1 Hunk #4 FAILED at 72. Hunk #8 FAILED at 173. 2 out of 8 hunks FAILED -- saving rejects to file utilities/scripts/digitaglinktree/digitaglinktree.1.rej patching file utilities/kipiiface/kipiinterface.cpp Hunk #1 FAILED at 173. 1 out of 1 hunk FAILED -- saving rejects to file utilities/kipiiface/kipiinterface.cpp.rej
Damn. Kindly ignore the last comment.
The patch provided here is obsolete Now in kipi plugins, we use KPMetadata class which wrap kipi host settings to KExiv2, especially xmp sidecar handling. Gilles