Bug 437175

Summary: Use media file timestamp when creating sidecar
Product: [Applications] digikam Reporter: Jozef Říha <jose1711>
Component: Metadata-SidecarAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED INTENTIONAL    
Severity: normal CC: metzpinguin
Priority: NOR    
Version First Reported In: 7.2.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 7.3.0
Sentry Crash Report:

Description Jozef Říha 2021-05-15 21:00:57 UTC
SUMMARY
It would be nice if digiKam syncs modification time of newly created sidecar with referenced media file.

STEPS TO REPRODUCE
1. Enable sidecar writes
2. Select a video file, add metadata
3. Have metadata saved to file

OBSERVED RESULT
Modified time of generated sidecar file has current timestamp

EXPECTED RESULT
Modified time of generated sidecar file matches with mtime of file it belongs to

SOFTWARE/OS VERSIONS
Arch Linux, x86_64 rolling
Comment 1 Maik Qualmann 2021-05-15 21:22:15 UTC
No, this is the only way for us to determine if the sidecar or image has been changed externally. We use the latest modification date for the database from the sidecar or image.

Maik
Comment 2 Maik Qualmann 2021-05-15 21:38:23 UTC
Another point are backup programs, if we change the modification date of a file, although it has not been changed, it is unnecessarily included in the backup.

Maik
Comment 3 Jozef Říha 2021-05-15 21:49:44 UTC
Not sure if I understand correctly. Maybe I missing a point?

Initial state:

- movie.avi     - mtime: 2003-01-01
- no .xmp file

Enabling sidecar in digiKam + edit of metadata + sync to file metadata:

- movie.avi     - mtime: 2003-01-01
- movie.avi.xmp - mtime: 2021-05-15 (current date)

Backup sw:
- sees a new file (.xmp) -> file is sent to backup, movie.avi is not processed (mtime stays the same)

digiKam:
- can keep track of sidecar changes internally (in the db) or write this info into sidecar file itself
Comment 4 Maik Qualmann 2021-05-16 07:05:04 UTC
I just tested the behavior of Darktable. Here, too, the sidecar has the current date.

Maik
Comment 5 Jozef Říha 2021-05-16 07:54:08 UTC
Thanks for checking, Maik. Looks like it works the same way across all known tools - also tried with Geeqie and exiftool. Might be something like a de-facto standard.