-
Notifications
You must be signed in to change notification settings - Fork 5
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
[FEATURE] Some pictures are displayed multiples times a day - How are the images selected to be shown? #138
Comments
That is exactly what I do. I randomize on server side and the web client receives this list. The client then iterates the randomized list one by one. |
Hhm,
I produce the numbers on the logs with:
Remove |
I think what breaks the random factor is the value of REFRESH_INTERVAL. Every time this is reached, a new random list is generated. |
Is it necessary to generate a new list every time? What about having a kind of hash or time stamp for the server side list and regenerate the client side list only if that hash has changed or the time stamp is younger that on client side. |
Thats the way how to client ensures to get new images from the server side. If this does not fit your needs, you could just turn up the interval. This should fix the issue. (Just keep in mind that turning up the interval, might increase the detection latency for new images) |
Had that in mind. Therefore I think you've chosen a good default value and increasing that value would just start later with showing duplicates. But nevertheless and without knowledge of how you realised your project: If it is possible to fetch a time stamp for the server side images list, an additional compare should make the design not too complicated. |
Yeah I know, but I'm basically always out of time, thus if things are not really broken I most likely will not touch them :D |
It's okay to reuse this question as an RFE? Solving this might be good for a rainy day... By the way: Love that app and found wrong or missing meta data in very old fotos. |
Great to hear, yeah sure, go for it! |
I'm provisioning my local infrastructure at home via truenas scale. But maybe this is what you are looking for: |
Not sure, if that works. I did the refresh manually in the morning and i.e. today I have roughly 15% duplicates. |
Regarding your suggestion to go with longer refresh intervals: I assume, that the refresh isn't the cause.
or
|
That's Ok, when there are to less images to fill the 12 hours. Then there are images that will be shown multiple times, because the slideshow restarts automatically at the beginning. |
I thought so, too, but: The app found about 250 images, each displayed 2 mins, which should be enough for more than 8 hours. |
I noticed the problem when RANDOM SLIDESHOW is enabled. Then a new random image is fetched for each “slideshowTick”. |
Please, if you think you have found an issue:
If you need space to discuss, please do it here: https://github.com/RouHim/this-week-in-past/discussions/ I don't want to sound rude, but it's like always. This is a hobby project that I'm doing besides family / work, so I have not much time. That's why I need your help if you have found a bug. @joe128 I'm pretty sure the random config is pretty buggy. So if you found something, please follow step 1-3 ;) Thanks |
Where do I find your mail address to send test data? |
I wonder, how you randomise the displayed images and if it is the intended use, that roughly 15-20% images are displayed more than once a day although there are more than enough images not displayed.
In numbers:
Yesterday I had 486 images in the +/- 3 day range found by your algo.
251 images had been displayed but only
207 uniq images.
I assume, you fill a list and randomly pick images from that list?
If so, might be filling a list, once randomise the order of that list and than pick images one by one be an idea to avoid twice (or more times) displaying the same image be an idea? When reaching the end of the list, just start at the beginning or do a new randomisation.
Caveat: I have no idea if such a list is hold on the server or in the browser a client side? If on server side, all clients would display the images in the same order.
The text was updated successfully, but these errors were encountered: