Bug 490611 - rating missing in thumbnails
Summary: rating missing in thumbnails
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Database-Scan (show other bugs)
Version: 8.4.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-21 14:20 UTC by fch22
Modified: 2024-08-20 18:18 UTC (History)
4 users (show)

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


Attachments
raw with 2* , Jpeg once generation, jepg with 2* after reread and metadata view (877.54 KB, image/png)
2024-07-21 14:20 UTC, fch22
Details
metadata advanced settings (27.01 KB, image/png)
2024-07-21 14:25 UTC, fch22
Details
metadata behavior settings (40.67 KB, image/png)
2024-07-21 14:25 UTC, fch22
Details
monitor album setting (22.33 KB, image/png)
2024-07-21 14:26 UTC, fch22
Details

Note You need to log in before you can comment on or make changes to this bug.
Description fch22 2024-07-21 14:20:20 UTC
Created attachment 171858 [details]
raw with 2* , Jpeg once generation, jepg with 2* after reread and metadata view

SUMMARY
ticket created following discussion in mail


STEPS TO REPRODUCE
1.  set rating to a raw file (for example ** )
2. generated a jpeg from DXO

OBSERVED RESULT
in album view , generated Jpeg is shown without *
metadata is showing the correct rating 
using "read metadata from file to database" update the rating correctly

screen shot attached showing original raw with 2* , generated jpegs , metadat view



EXPECTED RESULT
generated jpeg should be shown automaticaly


ADDITIONAL INFORMATION
Comment 1 fch22 2024-07-21 14:25:03 UTC
Created attachment 171859 [details]
metadata advanced settings
Comment 2 fch22 2024-07-21 14:25:42 UTC
Created attachment 171860 [details]
metadata behavior settings
Comment 3 fch22 2024-07-21 14:26:31 UTC
Created attachment 171861 [details]
monitor album setting
Comment 4 Maik Qualmann 2024-07-21 14:56:18 UTC
OK, now I understand. You really want to capture the change at digiKam runtime. You should always write that.
In both digiKam-8.4.0-Qt5 version and in the Qt6 version the QFileSystemWatcher is broken. Since it still works here under Linux, it is a package bug in the Windows version (maybe something is missing in the Qt compilation for Windows?). As a note, in the Qt6 version the QNetworkManager is also broken, no internet currently.

Maik
Comment 5 caulier.gilles 2024-07-21 15:02:23 UTC
Hi Maik, 

You want means a missing dependency while Qt compilation ? Which one ? QFileSystemWatcher needs specific lib to be compiled under Windows ?

Gilles
Comment 6 Maik Qualmann 2024-07-21 16:08:39 UTC
The search for the problem with the QFileSysemWatcher will probably take longer, I have tested versions dating back to June that also have the problem.

What surprises me is that the QNetworkManager problem no longer exists.

For you, CTRL+F5 is currently the fastest way to update the album.

Maik
Comment 7 caulier.gilles 2024-07-21 16:36:18 UTC
Code for QFileSystemWatcher for Windows:

https://github.com/qt/qtbase/blob/6.7.2/src/corelib/io/qfilesystemwatcher_win_p.h
https://github.com/qt/qtbase/blob/6.7.2/src/corelib/io/qfilesystemwatcher_win.cpp

It use an internal thread and it catch Windows events

Gilles
Comment 8 caulier.gilles 2024-07-21 16:37:34 UTC
It's clear, there is no specific dependency for QfilesystemWatcher under Windows
Comment 9 caulier.gilles 2024-07-21 16:39:13 UTC
I cannot found any report in qt bugzilla about QFileSystemWatcher.

I see few dysfunction reported in stack overflow because the instance must be created with new to handle the thread in background.

Gilles
Comment 10 Maik Qualmann 2024-07-21 17:50:26 UTC
Git commit 9b23ea5da98b92ceb2ce20ef0df781f1eff7a557 by Maik Qualmann.
Committed on 21/07/2024 at 17:48.
Pushed by mqualmann into branch 'master'.

fix the problem with the QFileSystemWatcher
We have an uninitialized variable in the static function.

M  +2    -0    core/libs/database/utils/ifaces/dio.cpp

https://invent.kde.org/graphics/digikam/-/commit/9b23ea5da98b92ceb2ce20ef0df781f1eff7a557
Comment 11 Maik Qualmann 2024-07-21 17:52:40 UTC
I don't know if I'm right about the patch, but it's worth a try. @Gilles, can you create a Windows Qt6 bundle today?

Maik
Comment 12 fch22 2024-07-22 07:15:23 UTC
(In reply to Maik Qualmann from comment #6)
> The search for the problem with the QFileSysemWatcher will probably take
> longer, I have tested versions dating back to June that also have the
> problem.
> 
> What surprises me is that the QNetworkManager problem no longer exists.
> 
> For you, CTRL+F5 is currently the fastest way to update the album.
> 
> Maik

Hi Maik
Ctrl+F5 is used to find new items, right? 
Here the generated JPG is found immediately, only the rating is missing. So finding new items doesn't solve the problem, I just need to "read metadata from file to database" to update the rating 
Frederic
Comment 13 Maik Qualmann 2024-07-22 16:39:49 UTC
Git commit ddd181277bcbfb6846f6cc01d7a10672e6ba27f0 by Maik Qualmann.
Committed on 22/07/2024 at 16:38.
Pushed by mqualmann into branch 'master'.

add test debu for processing count

M  +2    -2    core/libs/database/utils/ifaces/dio.cpp

https://invent.kde.org/graphics/digikam/-/commit/ddd181277bcbfb6846f6cc01d7a10672e6ba27f0
Comment 14 Maik Qualmann 2024-07-22 21:09:31 UTC
After the test debug, no event is sent by the QFileSystemWatcher.

Maik
Comment 15 sylvainsjc 2024-08-02 12:54:03 UTC
Hello, I use the appimage versions of Digikam under Debian 12
I arrived here because I also noticed this problem of missing rating for jpegs generated by Darktable
If I launch Digikam 8.3 (digiKam-8.3.0-x86-64.appimage) and generate a jpeg, the rating is present
When I launch Digikam 8.4 (digiKam-8.4.0-Qt6-x86-64.appimage) and generate a jpeg, no more rating
Comment 16 Maik Qualmann 2024-08-02 18:10:40 UTC
@sylvainsjc: Please describe exactly what you mean by creating JPEG and what steps you follow.

Maik
Comment 17 Maik Qualmann 2024-08-02 21:32:30 UTC
Git commit c448a4d0d86af49573a6f90df84d3a22196c8ee2 by Maik Qualmann.
Committed on 02/08/2024 at 21:30.
Pushed by mqualmann into branch 'master'.

fix possible loss of database metadata in the Image Editor

M  +6    -0    core/utilities/imageeditor/core/editorcore.cpp
M  +2    -0    core/utilities/imageeditor/core/editorcore.h
M  +2    -0    core/utilities/imageeditor/core/editorcore_p.h
M  +6    -7    core/utilities/imageeditor/main/imagewindow.cpp
M  +0    -1    core/utilities/imageeditor/main/imagewindow_p.h

https://invent.kde.org/graphics/digikam/-/commit/c448a4d0d86af49573a6f90df84d3a22196c8ee2
Comment 18 sylvainsjc 2024-08-03 08:44:41 UTC
(In reply to Maik Qualmann from comment #16)
> @sylvainsjc: Please describe exactly what you mean by creating JPEG and what
> steps you follow.
> 
> Maik

1) I take photos in RAW format and edit them with Darktable
By default darktable rates these photos with 2 stars
2) Then I export my photos in jpeg format
3) I place the jpeg files in a folder managed by Digikam
4) I open Digikam and it finds the new jpeg photos. Until release 8.3 the rating was well retrieved but with release 8.4, the rating is missing
Comment 19 Maik Qualmann 2024-08-03 11:26:55 UTC
Git commit beb112361fc5a380539c98ba160cea3a463be9c0 by Maik Qualmann.
Committed on 03/08/2024 at 11:26.
Pushed by mqualmann into branch 'master'.

fix no rating and wrong date for new scanned items

M  +6    -2    core/libs/database/coredb/coredb.cpp

https://invent.kde.org/graphics/digikam/-/commit/beb112361fc5a380539c98ba160cea3a463be9c0
Comment 20 Maik Qualmann 2024-08-20 18:18:31 UTC
Works fine again in the pre-release build of digiKam-8.5.0.

Maik