Bug 419793 - Presentation shuffle not working.
Summary: Presentation shuffle not working.
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-Generic-Presentation (show other bugs)
Version: 6.4.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-07 13:30 UTC by Richard
Modified: 2020-04-12 14:35 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard 2020-04-07 13:30:17 UTC
SUMMARY
Shuffle Presentation does not shuffle.


STEPS TO REPRODUCE
1. Select multiple photos.
2. View, Presentation. Check: Shuffle images. 
3. Start.

OBSERVED RESULT
Photos are not shuffled.

EXPECTED RESULT
Shuffled photos.

SOFTWARE/OS VERSIONS - Mac and Linux
Windows: 
macOS: 10.14.6 (digiKam 6.4.0)
Linux/KDE Plasma: Ubuntu 18.04 (digiKam 5.6.0)
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 caulier.gilles 2020-04-07 14:09:47 UTC
Presentation tool work as expected here, with 7.0.0 beta3

Do you use OpenGL effects ?

Gilles Caulier
Comment 2 Maik Qualmann 2020-04-07 16:08:30 UTC
The same here the images are random. It doesn't matter whether OpenGL or Ken Burns or Normal, the images are played shuffled. You specified MacOS and Ubuntu, should the problem occur with both versions?

Maik
Comment 3 Maik Qualmann 2020-04-10 18:43:04 UTC
Any feedback? Random play definitely works. Otherwise I close the bug for digiKam-7.0.0-Beta3.

Maik
Comment 4 caulier.gilles 2020-04-10 19:51:44 UTC
yes, for me too, it work as expected...

Gilles Caulier
Comment 5 Richard 2020-04-12 09:37:59 UTC
I had to investigate a little to narrow down the cause.

Background: I use multiple configuration files so I can manage different sets of photos. I then use "digikam --config $PWD/library.conf" to open the Photo set I want.

To create a new config file, I use "touch library.conf" and then "digikam $PWD/library.conf" because digiKam won't work if the config does not exist. Next I go through the initial setup.

So far so good, everything seems to work perfect except shuffling presentations. I just found out that if I create a config file in that way, it won't have a "[Presentation Settings]" section. For some reason it just won't be created, even after starting a presentation. And without that section the presentation Shuffle won't work.

To work around, I copied the "[Presentation Settings]" section from ~/.digikamrc into my "library2.conf" and then it seems to work. (great!)

But there is something else strange. If I remove the "[Presentation Settings]" from ~/.digikamrc, and then start digikam with "digikam --config $HOME/.config/digikamrc", I get exactly the same problem as above (no [Presentation Settings]). Then if I exit digiKam and start it without using the "--config" parameter, then shuffle works fine and "[Presentation Settings]" is created automatically.

So it looks like something is wrong with the --config parameter. At least I have a work-around now, so I can fix my config files manually and shuffle.





Here are details:

Versions
* Tested on Ubuntu 18.04 digiKam 5.6.0
* Same on macOS digiKam 6.4.0


Steps to reproduce

(method 1):

cd tmp
touch library.conf
digikam --config $PWD/library.conf
# Go through initial setup
# Settings, Configure digiKam. Collections. Add network share.
# Select all photos.
# View, presentation. Shuffle images. Start presentation.
# Won't be shuffled
# exit digiKam
# "[Presentation Settings]" won't be created

(method 2)

vi ~/.config/digikamrc
# remove "[Presentation Settings]"  section
digikam --config $HOME/.config/digikamrc
# shuffle presentation =-> it won't be shuffled
# exit digiKam
# "[Presentation Settings]" won't be created
# Launch digikam again without --config
digikam
# shuffle presentation =-> it works!!
# exit digiKam
# "[Presentation Settings]" was been created.
Comment 6 Richard 2020-04-12 10:07:36 UTC
One last addition. After using the above work-around, I can conclude that when using the "--config" parameter, the [Presentation Settings] won't be created, nor updated. 

In other words:

digikam --config $HOME/digikamrc

# Change settings in Presentation dialog
# Restart digikam
# Changed settings were not saved

# start without --config
digikam
# do the same
# Changed settings were saved
Comment 7 Maik Qualmann 2020-04-12 10:09:02 UTC
After a short test here it doesn't matter whether I start with a new configuration via "config" parameter or delete the [Presentation Settings] section. Of course, when I have opened the presentation tool, I first have to activate the CheckBox for shuffle.
In addition, the [Presentation Settings] section is always re-created after exiting the tool.

Maik
Comment 8 Maik Qualmann 2020-04-12 10:16:00 UTC
I can reproduce something, maybe it's because of the use of the "$HOME" variable, more tonight.

Maik
Comment 9 Maik Qualmann 2020-04-12 14:35:55 UTC
Git commit 9c4a2605c89b4fbf0b84fc2225c7cafb71631789 by Maik Qualmann.
Committed on 12/04/2020 at 14:34.
Pushed by mqualmann into branch 'master'.

fix use of KConfig instead of KSharedConfig #1
FIXED-IN: 7.0.0

M  +8    -8    core/dplugins/generic/view/presentation/dialogs/presentationdlg.cpp

https://invent.kde.org/kde/digikam/commit/9c4a2605c89b4fbf0b84fc2225c7cafb71631789