Summary: | Edit Metadata dialog doesn't honour settings for XMP sidecar [patch] | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | Daniel Berrange <dan-kde> |
Component: | Plugin-Generic-MetadataEdit | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | major | CC: | caulier.gilles, smit.meh |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 4.11.0 | |
Sentry Crash Report: | |||
Attachments: | Fix kipi-plugins to load digikam settings before load/save of metadata via KExiv2 |
Description
Daniel Berrange
2011-05-24 14:58:43 UTC
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 |