Bug 361870 - mediaframe: Randomize items disabled but still randomized
Summary: mediaframe: Randomize items disabled but still randomized
Status: RESOLVED FIXED
Alias: None
Product: kdeplasma-addons
Classification: Plasma
Component: Media Frame (show other bugs)
Version: 5.6.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-16 20:09 UTC by hamelg
Modified: 2020-01-02 15:37 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
sort contents of directories alphabetically (856 bytes, patch)
2016-09-24 12:08 UTC, Joachim
Details

Note You need to log in before you can comment on or make changes to this bug.
Description hamelg 2016-04-16 20:09:07 UTC
I want to have the pictures displayed in the alphabetic filenames order, but the applet continues to play them in the random order, despite the check box "Randomize items" cleared. 

Reproducible: Always

Steps to Reproduce:
1. Create 5 files named 1.png, 2.png, 3.png 4.png, 5.png in the directory test. For example, with imagemagick
convert -background lightblue -fill blue -pointsize 72 label:111 1.png
2. add this directory in mediaframe paths
3. uncheck "Randomize items"

Actual Results:  
Images are displayed in random order

Expected Results:  
MediaFrame should played in this order : 1.png 2.png 3.png 4.png 5.png
Comment 1 Joachim 2016-09-23 20:28:22 UTC
Hi

I just tried to reproduce it and for me it seems to work. I have kdeplasma-addons 5.7.5 installed. Does this problem still occur to you?
Comment 2 hamelg 2016-09-23 21:45:04 UTC
Here, this issue still occurs :(
The workaround is to add each file one by one in the right order.
Comment 3 Joachim 2016-09-24 09:56:22 UTC
Ahh, I found the root of the issue. It's not that the random setting gets ignored. The problem is that the files are not added to the list in alphabetical order, but for me it was in inverse creation order.
I assume more precisely it's inverse whatever-order-the-filesystem-returns. So for directories that have seen lots of changes it could also be some order that appears random. But as long as nobody touches that directory it will always be the same.

I can see the use of reading the files in alphabetical order. Would be nice to have. But that makes it a bit more difficult.
Comment 4 Joachim 2016-09-24 12:08:44 UTC
Created attachment 101255 [details]
sort contents of directories alphabetically

Attached a patch that makes directory contents added alphabetically.
Comment 5 Nate Graham 2020-01-02 15:37:18 UTC
Cannot reproduce; looks like this was fixed.