Bug 391440 - Metadata (date) is not refreshed after a file has been modified
Summary: Metadata (date) is not refreshed after a file has been modified
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Metadata-Date (show other bugs)
Version: 5.8.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-05 14:31 UTC by MarcP
Modified: 2018-09-13 17:32 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.9.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description MarcP 2018-03-05 14:31:45 UTC
I changed the time of a few scanned pictures which had not previous date using the metadata editor. In the thumbnail view, the old date is still displayed unless I do "Item -> Re-read metadata from selected images".

The "Settings -> Configure digikam -> Metadata -> Rescan file when files are modified" is checked.
Comment 1 Maik Qualmann 2018-03-05 19:28:47 UTC
Git commit 999b629ce0d13fcf43b1cb0b2e10e6d5645adbb5 by Maik Qualmann.
Committed on 05/03/2018 at 19:27.
Pushed by mqualmann into branch 'master'.

after using the metadata editor, we need a full re-scan
FIXED-in: 5.9.0

M  +2    -1    NEWS
M  +4    -2    app/main/digikamapp.cpp
M  +3    -1    utilities/imageeditor/main/imagewindow.cpp
M  +3    -1    utilities/lighttable/lighttablewindow.cpp

https://commits.kde.org/digikam/999b629ce0d13fcf43b1cb0b2e10e6d5645adbb5
Comment 2 MarcP 2018-03-15 17:32:35 UTC
Sorry to comment on a closed bug, but I am using the last 5.9.0 version and I still have this issue. After changing the date of a picture or group of pictures (either using the "Edit metadata" or using the "Batch queue manager") I need to re-read the metadata from the selected images so digikam . 

In some rare cases, digikam does so automatically and refreshes the metadata by itself, but it's maybe the 10% of the time.

Editing tags, however, does not have this problem, the tags always appear immediately after saving them.
Comment 3 caulier.gilles 2018-03-15 18:20:44 UTC
and of course the right option in Metadata setup page is turned one to re-read metadata when file is changed ? As i can see the problem is not too much reproducible here with 5.9.0.

Note : in 6.0.0, since i introduced the ffmpeg metadata parser for video files, i already fixed some problems with metadata date rules, and i plan to review all metadata engine in digiKam. The implementation need to be re-factored better. I cannot do it in 5.9.0 as the code changes will be important.

Gilles Caulier
Comment 4 MarcP 2018-03-15 18:23:25 UTC
Yes, the "Rescan file when files are modified" is checked. Don't worry, I'll wait for version 6.0 and report back if this behavior is still present.
Comment 5 MarcP 2018-04-03 21:21:26 UTC
Sorry for commenting on a closed bug report. I downloaded the current digikam 6.0-git version (for windows) and the behavior is exactly the same as in version 5.8. I still need to manually click on "re-read metadata on from selected images" every time I change the date of a picture or group of pictures.

It is quite easy to reproduce. Select a tag on the tag panel, select a picture and edit its metadata, change the date and click accept. The metadata is changed in the picture but the info is not refreshed in digikam's database. Click on "Re-read metadata From File" and then the file will be automatically placed in the correct chronological position. 

Ideally, that step should be done automatically after editing metadata.
Comment 6 Maik Qualmann 2018-04-04 06:01:39 UTC
The metadata is certainly updated. It could be that the right sidebar is not yet refreshed. I'll take a look tonight.

Maik
Comment 7 Maik Qualmann 2018-04-04 18:15:00 UTC
Git commit cb235dca7875770eeb542e1c1773ddcade8f6bfb by Maik Qualmann.
Committed on 04/04/2018 at 18:12.
Pushed by mqualmann into branch 'master'.

refresh the right sidebar metadata tab after using the metadata editor

M  +1    -0    core/app/main/digikamapp.cpp

https://commits.kde.org/digikam/cb235dca7875770eeb542e1c1773ddcade8f6bfb
Comment 8 Maik Qualmann 2018-04-04 18:24:03 UTC
The metadata tab of the right sidebar was not refreshed, so I can reproduce it. I do not quite understand her problem description. Did you sort your images by date? Select a tag, left sidebar? Note that the refresh interval for date view and timeline is currently 30 seconds.

Maik
Comment 9 MarcP 2018-04-04 18:41:46 UTC
I have my photos sorted by date, yes. When I see a photo with the wrong date (it is displayed under each photo in the thumbnail view), I edit the metadata and change the date. However the change is not reflected in digikam until I re-read the metadata from the file. When I do that, the date and the position of the photo in thr album is correctly set. It doesn't happen 100% of the time (maybe 95%). It is the same when pictures are selected from a Tag, a date in the timeline or a Person.

It is actually quite simple. If I could record my screen it wouldn't takeore than 10 seconds to show you.
Comment 10 MarcP 2018-04-05 00:18:20 UTC
I made a short clip showing this behavior. I hope it's clearer now:
https://imgur.com/a/yyn9t
Comment 11 Maik Qualmann 2018-04-05 09:00:03 UTC
Ok, I can not reproduce the problem here right now, on Linux or Windows. The metadata is updated, but the view is not refreshed. My guess is that it's related to the QFileSystemWatcher. Digikam also has to work without QFileSystemWatcher, that's not the case everywhere. However, the restructuring of the IOJobs class can also solve this problem. Is your image collection on a network drive?

Maik
Comment 12 MarcP 2018-04-05 09:04:39 UTC
Yes, the collection is stored on a samba network drive (debian server, windows 10 client).
Comment 13 MarcP 2018-09-13 16:12:12 UTC
I just wanted to say that this bug is still present in the last beta for windows digiKam-6.0.0-beta1-20180903T144815-Win64.exe
Comment 14 caulier.gilles 2018-09-13 17:32:27 UTC
A new windows installer is in the tube, but i'm fight agoain PGP to sign the package. This one refuse to run since 2 days, without any error message and i'm lost for the moment.

Gilles Caulier