Bug 451347 - Missing Rating info in XMP sidecar, for RAW files.
Summary: Missing Rating info in XMP sidecar, for RAW files.
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Metadata-Sidecar (other bugs)
Version First Reported In: 7.6.0
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-10 02:02 UTC by mippo
Modified: 2022-03-20 07:26 UTC (History)
3 users (show)

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


Attachments
sample of JPG, ARW picture and related XMP files (26.7MB) (83 bytes, text/plain)
2022-03-10 11:49 UTC, mippo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mippo 2022-03-10 02:02:33 UTC
SUMMARY
The picture rating info, of a RAW picture, are not written in the related xmp sidecar file.
Specifically regarding the Star, Flag and Color (not sure about other). 
Actually they work for the JPG files, but not for RAW files, even if that info are correctly shown in the preview of the GUI interface.
Probably, my opinion, is that they are written in the Database, but not in the xmp sidecar file.


STEPS TO REPRODUCE
1.  select the two files JPG and RAW, related to a same picture, regardless they are "Grouped" or not; 
2. apply a Star or a Flag or a Color rating, or even a combination of them;
3. open the TWO xmp files just created, using any text editor ;
4. find the Star, Flag or color setting you applied, in both jpg and RAW sidecar files
5. you will find the correct setting in the jpg xmp file, but not in the RAW xmp file;

OBSERVED RESULT
see point 5. above 

EXPECTED RESULT
I need the same result settings reflected in both jpg and RAW xmp files, in order to allow some further software manipulation using other tools.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 5.24.3
KDE Frameworks Version: 5.91.0
Qt Version: 5.15.3


ADDITIONAL INFORMATION
Tried various combination settings in   Settings/Configuration/Metadata/Sidecar  menu, without success.
Comment 1 Maik Qualmann 2022-03-10 07:04:14 UTC
I can not reproduce the problem, all information is also written in the sidecar of the RAW file. Is your RAW file sidecar possibly read-only?
Sample images, JPG + RAW + sidecar, with which the problem occurs with you would also be good.
Otherwise we need a DebugView log during the write process, you can find a description here:

https://www.digikam.org/contribute/

Maik
Comment 2 mippo 2022-03-10 11:49:11 UTC
Created attachment 147420 [details]
sample of JPG, ARW picture and related XMP files (26.7MB)

The 2 xmp files are created by DigiKam which assigned 1 star rating.
This rating is misaligned in xmp files, that is the issue.
Comment 3 mippo 2022-03-10 12:05:19 UTC
(In reply to mippo from comment #2)
> Created attachment 147420 [details]
> sample of JPG, ARW picture and related XMP files (26.7MB)
> 
> The 2 xmp files are created by DigiKam which assigned 1 star rating.
> This rating is misaligned in xmp files, that is the issue.

find here the 26.7 zip file --> https://drive.google.com/file/d/1sJFOWZ3ufdHkkQ1iqObL0rN_iMIv3ckj/view?usp=sharing
Also please note that if I add a metadata model, specifically for adding copyright, this will create a new, third, xmp file.
As result I have 2 picture files, JPG and ARW files plus 3 xmp files:    .ARW.xmp,    .JPG.xmp,    .xmp
Comment 4 Maik Qualmann 2022-03-10 17:48:40 UTC
OK, the problem is clear. You played with the sidecar settings too much. You now have one sidecar with BASENAME.JPG.xmp and one with BASENAME.xmp. That does not work like this. The BASENAME.xmp always takes precedence to give Lightroom users the ability to always read their sidecars on import. However, the BASENAME.xmp scheme is bad for files with the same base names, since only one sidecar is responsible for both. Disable the option for "Sidecar Compatible for Commercial Programs" and delete the sidecar BASENAME.xmp.

Maik
Comment 5 mippo 2022-03-14 20:28:54 UTC
Thanks Maik for your help,
disabling the option "Sidecar Compatible for Commercial Programs", now allows a correct synchronization with both xmp sidecar files and no longer creation of the third xmp file.

This option IMHO could create confusion, I selected it in order to have a better compatibility with other program (Darktable) and then forgot it (... or maybe DT is not considered a "Commercial" program ... ;).
It could be a good idea to have a visible notice of which setting has been changed from default, or a button able to restore default settings, like in KDE Plasma settings.
Comment 6 Maik Qualmann 2022-03-20 06:41:42 UTC
The default setting for sidecars is all disabled. A reset button doesn't really make sense. However, we will again add a notification dialog when activating this special sidecar setting.

Maik
Comment 7 Maik Qualmann 2022-03-20 07:26:26 UTC
Git commit 21fbc86e9ba0d8b23d5c5ed2687d6f2d12badcf5 by Maik Qualmann.
Committed on 20/03/2022 at 07:25.
Pushed by mqualmann into branch 'qt5-maintenance'.

show info when sidecar file name option is clicked
FIXED-IN: 7.7.0

M  +2    -1    NEWS
M  +21   -0    core/utilities/setup/metadata/setupmetadata.cpp
M  +1    -0    core/utilities/setup/metadata/setupmetadata.h
M  +41   -40   core/utilities/setup/metadata/setupmetadata_p.cpp
M  +1    -0    core/utilities/setup/metadata/setupmetadata_p.h

https://invent.kde.org/graphics/digikam/commit/21fbc86e9ba0d8b23d5c5ed2687d6f2d12badcf5