Bug 459124 - Tags are duplicated when adding People/Face tags
Summary: Tags are duplicated when adding People/Face tags
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Tags-Keywords (show other bugs)
Version: 7.6.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-14 19:10 UTC by José Oliver-Didier
Modified: 2022-09-17 15:17 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 7.9.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description José Oliver-Didier 2022-09-14 19:10:07 UTC
SUMMARY
***
Tags are duplicated when adding People/Face tags


STEPS TO REPRODUCE
1. In Digikam Settings -> Metadata -> Behavior tab - have write metadata options for "Face Tags" and "Image Tags" enabled. 
2. In Digikam Settings -> Metadata -> Advanced tab - Tags Write Options for XMP.digikam.Taglist, XMP.dc.subject and IPTC.Application2.Keywords checked/enabled.
2. Add a Face Tag


OBSERVED RESULT
- Tags added to IPTC and XMP Subject for the names added are duplicated.

EXPECTED RESULT
- No duplication of tags

SOFTWARE/OS VERSIONS
Windows 11

ADDITIONAL INFORMATION

XMP Example (obtained using Exiftool), observed subject entry for Alicia appears twice (same for IPTC). Digikam taglist appears hiercharchy notation (expected). 

			<digiKam:TagsList>
				<rdf:Seq>
					<rdf:li>People/Alicia</rdf:li>
					<rdf:li>Alicia</rdf:li>
				</rdf:Seq>
			</digiKam:TagsList>
			<dc:subject>
				<rdf:Bag>
					<rdf:li>Alicia</rdf:li>
					<rdf:li>Alicia</rdf:li>
				</rdf:Bag>
			</dc:subject>
Comment 1 Maik Qualmann 2022-09-14 20:14:36 UTC
I can't reproduce here with the development version of digiKam-8.0.0. The tag is only added once. How are your sidecar settings? Please update to the currently stable digiKam-7.8.0 version.

Maik
Comment 2 Maik Qualmann 2022-09-14 20:23:48 UTC
You have duplicate the person tag outside of people, when this is added it appears duplicated. Ok, for DC and IPTC it's weird as a single keyword.

Maik
Comment 3 Maik Qualmann 2022-09-14 20:42:09 UTC
Git commit c08eb2cf1c9f45a599002430fd6bb6549d9b414f by Maik Qualmann.
Committed on 14/09/2022 at 20:41.
Pushed by mqualmann into branch 'qt5-maintenance'.

prevent duplicate tags in metadata without tag path
FIXED-IN: 7.9.0

M  +2    -1    NEWS
M  +2    -0    core/libs/metadataengine/dmetadata/dmetadata_tags.cpp

https://invent.kde.org/graphics/digikam/commit/c08eb2cf1c9f45a599002430fd6bb6549d9b414f
Comment 4 José Oliver-Didier 2022-09-17 13:40:48 UTC
This should also apply to the EXIF XPKeywords as well not just dc.subject and iptc keywords.
Comment 5 Maik Qualmann 2022-09-17 15:17:07 UTC
The metadata entry EXIF XPKeywords is currently only readable for us with Exiv2. It's a long story, bug reports exist.

Maik