-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
photoframe.py #33
Comments
Hi, something like this cropped up before. I think the random seed relies on using time and that's always the same value when starting at boot (though it seems unlikely that it would be exactly the same). I will try to think of a better way to re-seed it and how you can make it run in order but starting at a random point. |
Hi, I've made a few changes on other things and pushed those changes up to the develop branch. However I'm not sure about the shuffle start option. I think it would need to be added as (yet) another command line config variable, as some people might want to start from zero if they were showing images from a specific subdirectory for instance. As a test you could modify PictureFrame2020.py (around line 330 in the previous version, 360 in the new one) # images in iFiles list
nexttm = 0.0
iFiles, nFi = get_files(date_from, date_to)
#next_pic_num = 0 ##<comment out
random.seed() ##<add
next_pic_num = random.randint(0, nFi) ##<add
sfg = None # slide for background
sbg = None # slide for foreground The extra complication is when you change the start and end dates or subfolder using MQTT the selection is refreshed and next_pic_num set to zero. If that's an issue then you would need to change the code in a similar way around line 290 (313 new) Let me know if this behaves as you would expect. Paddy |
Thanks Paddy
Give me a couple of days and I'll report back.
…On Wed, 25 Nov 2020, 11:08 paddywwoof, ***@***.***> wrote:
Hi, I've made a few changes on other things and pushed those changes up to
the develop branch. However I'm not sure about the shuffle start option. I
think it would need to be added as (yet) another command line config
variable, as some people might want to start from zero if they were showing
images from a specific subdirectory for instance.
As a test you could modify PictureFrame2020.py (around line 330 in the
previous version, 360 in the new one)
# images in iFiles listnexttm = 0.0iFiles, nFi = get_files(date_from, date_to)#next_pic_num = 0 ##<comment outrandom.seed() ##<addnext_pic_num = random.randint(0, nFi) ##<addsfg = None # slide for backgroundsbg = None # slide for foreground
The extra complication is when you change the start and end dates or
subfolder using MQTT the selection is refreshed and next_pic_num set to
zero. If that's an issue then you would need to change the code in a
similar way around line 290 (313 new)
Let me know if this behaves as you would expect.
Paddy
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#33 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AR4AY7RJVLTGNEYYQCOADW3SRTQR3ANCNFSM4UBBTYEQ>
.
|
Photoframe displaying (large) photo collection in 'shuffle of' mode always starts with the same photo so the playlist never gets through to the far end.
I'd like to shuffle the start image then from that image onwards be recursive through the folders and files. That would get all the images seen over a few days. Imagine a holiday trip - you'd want to see the pictures it in the time sequence but you dont want to see the same trip each start up.
Apologies if I missed the obvious in my trawl through the documentation.
The text was updated successfully, but these errors were encountered: