[Bug 268688] New: Write metadata to all images does not remove obsolete tags

classic Classic list List threaded Threaded
54 messages Options
123
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 268688] Write metadata to all images does not remove obsolete tags

DrSlony-4
https://bugs.kde.org/show_bug.cgi?id=268688

--- Comment #39 from DrSlony <[hidden email]> ---
digiKam is first and foremost a digital asset management program. This issue
should be given the highest priority.

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 268688] Write metadata to all images does not remove obsolete tags

Mårten Jansson
In reply to this post by Bugzilla from kde@mfraz.orangehome.co.uk
https://bugs.kde.org/show_bug.cgi?id=268688

--- Comment #40 from Mårten Jansson <[hidden email]> ---
Any updates?

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 268688] Write metadata to all images does not remove obsolete tags

DrSlony-4
In reply to this post by Bugzilla from kde@mfraz.orangehome.co.uk
https://bugs.kde.org/show_bug.cgi?id=268688

--- Comment #41 from DrSlony <[hidden email]> ---
A year later :/

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 268688] Write metadata to all images does not remove obsolete tags

Veaceslav Munteanu
In reply to this post by Bugzilla from kde@mfraz.orangehome.co.uk
https://bugs.kde.org/show_bug.cgi?id=268688

--- Comment #42 from Veaceslav Munteanu <[hidden email]> ---
I will fix this issue as part of my Tag Manager proposal, please wait a little
bit longer :)

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 268688] Write metadata to all images does not remove obsolete tags

Gilles Caulier-4
In reply to this post by Bugzilla from kde@mfraz.orangehome.co.uk
https://bugs.kde.org/show_bug.cgi?id=268688

--- Comment #43 from Gilles Caulier <[hidden email]> ---
Hi all here,

I discovered a dummy bug in maintenance tool about metadata synchronization
which in fact do exactly the opposite. Typically, tool read back image metadata
to DB against the inverse.

So, Tags are always restored from file data to DB... It's weird.

I fixed this problem for next 3.4.0 release planed in September. I cannot
reproduce this Tags tree problem, but it would be nice if somebody in this file
can check behavior using current implementation from git/master.

Thanks in advance

Gilles Caulier

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 268688] Write metadata to all images does not remove obsolete tags

Gilles Caulier-4
In reply to this post by Bugzilla from kde@mfraz.orangehome.co.uk
https://bugs.kde.org/show_bug.cgi?id=268688

Gilles Caulier <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|2.0.0                       |3.3.0

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 268688] Write metadata to all images does not remove obsolete tags

Gilles Caulier-4
In reply to this post by Bugzilla from kde@mfraz.orangehome.co.uk
https://bugs.kde.org/show_bug.cgi?id=268688

--- Comment #44 from Gilles Caulier <[hidden email]> ---
Created attachment 81960
  --> https://bugs.kde.org/attachment.cgi?id=81960&action=edit
Patch : debug statements and quick fix

I found where is bug.

It's in loop from MetadataHub::write() where tags list is recreated before to
apply on metadata.

This patch add debug statement to see how is handle tags status from DB and to
create tags list to record.

The quick fix here is to disable the line #712 from metadatahub.cpp to prevent
loading old path tags list from image metadata.

In fact the loop processed just after run on tags status from DB. It do not
handle tags which are not in DB (but always present in image metadata). So,
loop process fine DB tags but ignore to remove obsolete one.

If we disable line #712, all sound work fine.

This cannot be the ultimate solution. The loop must be simplified as there is
nothing to handle from a previous tags list loading from image metadata.

I see also that there is always an empty tag from DB checked by the loop. By
chance this one is drop when tags list is recorded to image metadata. I don't
know where it come from. Perhaps it's a bug in TagsCache class...

Please review my patch and test. If this solution is fine, i will make a better
patch for next 3.4.0 release planed on next Monday.

Gilles Caulier

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 268688] Write metadata to all images does not remove obsolete tags

Elle Stone
In reply to this post by Bugzilla from kde@mfraz.orangehome.co.uk
https://bugs.kde.org/show_bug.cgi?id=268688

--- Comment #45 from Elle Stone <[hidden email]> ---
I applied Gille's patch and so far everything seems to work like it should,
meaning I haven't (yet?) been able to cause a discrepency between the
image/sidecar metadata and the database.

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 268688] Write metadata to all images does not remove obsolete tags

Gilles Caulier-4
In reply to this post by Bugzilla from kde@mfraz.orangehome.co.uk
https://bugs.kde.org/show_bug.cgi?id=268688

--- Comment #46 from Gilles Caulier <[hidden email]> ---
Thanks Elle,

The more advanced test to do is to cha,ge tas on right sidebar to a multiple
selection, with combined values, as common tags shared between images, tags
removed, tags added, and tags renamed.

There is also a test to check with and without XMP sidecar support enabled.

If all work fine as expected, well i will improve my patch as i explained
before.

Thanks in advance for your feedback

Gilles Caulier

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 268688] Write metadata to all images does not remove obsolete tags

Veaceslav Munteanu
In reply to this post by Bugzilla from kde@mfraz.orangehome.co.uk
https://bugs.kde.org/show_bug.cgi?id=268688

--- Comment #47 from Veaceslav Munteanu <[hidden email]> ---
:| We ended up doing the same work. Before I could read your post I also found
the source of bug.

But your patch s not complete, there is a special case that I fixed:

setXmpKeybords from dmetadata called AddToTagStringBag instead of
setXmpTagStringBag

which also causes duplicates.

Ok.. I will commit my changes.

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 268688] Write metadata to all images does not remove obsolete tags

Veaceslav Munteanu
In reply to this post by Bugzilla from kde@mfraz.orangehome.co.uk
https://bugs.kde.org/show_bug.cgi?id=268688

Veaceslav Munteanu <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|CONFIRMED                   |RESOLVED
         Resolution|---                         |FIXED

--- Comment #48 from Veaceslav Munteanu <[hidden email]> ---
I think it should be done now.

Please test and report if everything work as it should :)

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 268688] Write metadata to all images does not remove obsolete tags

Gilles Caulier-4
In reply to this post by Bugzilla from kde@mfraz.orangehome.co.uk
https://bugs.kde.org/show_bug.cgi?id=268688

Gilles Caulier <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Version Fixed In|                            |3.4.0
      Latest Commit|                            |http://commits.kde.org/digi
                   |                            |kam/e15b54f988db686994dea2c
                   |                            |1711d80dbf5c8c45d

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 268688] Write metadata to all images does not remove obsolete tags

Gilles Caulier-4
In reply to this post by Bugzilla from kde@mfraz.orangehome.co.uk
https://bugs.kde.org/show_bug.cgi?id=268688

--- Comment #49 from Gilles Caulier <[hidden email]> ---
Git commit e15b54f988db686994dea2c1711d80dbf5c8c45d by Veaceslav Munteanu.
Committed on 27/08/2013 at 17:14.
Pushed by munteanu into branch 'master'.

BUG: 268688 Disable read of old tag paths and use setXmpTagStringBag in
dmetadata

M  +1    -1    digikam/fileaction/metadatahub.cpp
M  +1    -1    libs/dmetadata/dmetadata.cpp

http://commits.kde.org/digikam/e15b54f988db686994dea2c1711d80dbf5c8c45d

diff --git a/digikam/fileaction/metadatahub.cpp
b/digikam/fileaction/metadatahub.cpp
index 115104a..6cb67c8 100644
--- a/digikam/fileaction/metadatahub.cpp
+++ b/digikam/fileaction/metadatahub.cpp
@@ -709,7 +709,7 @@ bool MetadataHub::write(DMetadata& metadata, WriteMode
writeMode, const Metadata

         // create list of keywords to be added and to be removed
         QStringList tagsPathList, oldKeywords, newKeywords;
-        metadata.getImageTagsPath(tagsPathList);
+        //metadata.getImageTagsPath(tagsPathList);

         for (QMap<int, TagStatus>::iterator it = d->tags.begin(); it !=
d->tags.end(); ++it)
         {
diff --git a/libs/dmetadata/dmetadata.cpp b/libs/dmetadata/dmetadata.cpp
index c465572..e8abb6a 100644
--- a/libs/dmetadata/dmetadata.cpp
+++ b/libs/dmetadata/dmetadata.cpp
@@ -3037,7 +3037,7 @@ QStringList DMetadata::getXmpKeywords() const

 bool DMetadata::setXmpKeywords(const QStringList& newKeywords, bool
setProgramName) const
 {
-    return addToXmpTagStringBag("Xmp.dc.subject", newKeywords,
setProgramName);
+    return setXmpTagStringBag("Xmp.dc.subject", newKeywords, setProgramName);
 }

 bool DMetadata::removeXmpKeywords(const QStringList& keywordsToRemove, bool
setProgramName)

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 268688] Write metadata to all images does not remove obsolete tags

Elle Stone
In reply to this post by Bugzilla from kde@mfraz.orangehome.co.uk
https://bugs.kde.org/show_bug.cgi?id=268688

--- Comment #50 from Elle Stone <[hidden email]> ---
This is from before the new patch!

Original Settings: Reading and Writing Metadata:
Read from sidecar files
Write to XMP sidecar only
(not checked: 'If possible write Metadata to RAW files')
I removed several tag heirarchies altogether from the list of tags, rearranged
several of the tags that were left, renamed one of the tags, selected all the
images, wrote the information to disk, closed and reopened digiKam.
Spot-checking with exiftool, the sidecars are exactly synchronized with the
database. The images, as expected, are not. At some point along the way I added
a tag with Exiftool to one image. digiKam has not noticed this new tag, which
is what should happen if the database really controls what goes into the xmp
sidecar files.

Change to New Settings: Reading and Writing Metadata:
Read from sidecar files
Write to image and XMP Sidecar
('If possible write Metadata to RAW files' is not checked)
Now changing digiKam settings so that digiKam writes to the image as well as
the sidecar, and writing to all images: The tag that I added to the image with
Exiftool was removed from the image file.  So the database is controlling what
goes into the image file and not the other way around. All jpeg metadata is now
synchronized to the database. The raw files of course are not, but the raw file
sidecars are synchronized.

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
123