Bug 352711

Summary: Externally removed tags are not removed from digiKam
Product: [Applications] digikam Reporter: karlgustavv23
Component: Tags-EngineAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: caulier.gilles, marcus.hardt
Priority: NOR    
Version: 4.12.0   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In: 6.0.0

Description karlgustavv23 2015-09-14 20:23:16 UTC
In Settings -> Configure -> Metadata -> Behavior: "Rescan file when files are modified" is set.

If you externally add a tag (e.g. via exiftool) and restart digiKam this new tag will appear in the tags list and the tool-tip will show it, too.

If you externally remove a tag (e.g. via exiftool) and restart digiKam this removed tag will stay in the tags list and the tool-tip will continue to show it, too.

Reproducible: Always

Steps to Reproduce:
1. Add a tag via exiftool (exiftool -subject+=Test -keywords+=Test test.jpg)
2. Open digiKam
3. See the tag appear
4. Close digiKam
5. Remove a tag via exiftool (exiftool -subject-=Test -keywords-=Test test.jpg)
6. Open digiKam
7. The tag is still there

Actual Results:  
The tag is still there

Expected Results:  
The tag should be removed
Comment 1 Marcus Hardt 2015-11-15 11:41:20 UTC
I can confirm this for the "Rating" Tag and Digikam 4.4.0.

Changing the tag via exiftool -TAG -Rating=2 <filename> will not be reflected in digikam.

Even if I copy the file to a different name it is not shown.

If I modify Rating via exiftool before digikam sees the file for the first time, it works well.
Comment 2 caulier.gilles 2016-12-01 10:04:22 UTC
You need to use Re-Read metadata function in digiKam to update the file properties in database.

Gilles Caulier
Comment 3 Maik Qualmann 2018-04-14 16:14:46 UTC
Git commit cfa88b7f0f8fae3e2aa44f152a93123ae9328a4e by Maik Qualmann.
Committed on 14/04/2018 at 16:13.
Pushed by mqualmann into branch 'master'.

remove in the DB all old image informations when rereading metadata from file
when all 8 metadata write options are enabled
Related: bug 380876, bug 392017
FIXED-IN: 6.0.0

M  +4    -1    NEWS
M  +35   -12   core/libs/database/coredb/coredb.cpp

https://commits.kde.org/digikam/cfa88b7f0f8fae3e2aa44f152a93123ae9328a4e