darickc / MMM-BackgroundSlideshow

MIT License
144 stars 84 forks source link

Don't repeate until all are used #132

Open cweinhofer opened 1 year ago

cweinhofer commented 1 year ago

I am using this module to turn one of my MMs into a combo photo viewer and heads-up display. As such, my images folder has 600+ pictures. With this use case, you really start to see the limitation of a random selection. Some photos seem like they show up almost weekly (I have slideshowSpeed set to show around 20 per week) and others I don't think I have ever seen.

It would be great if there was a noRepeat option in the config that made sure every image was shown once before cycling through again. One way to accomplish this while still allowing for the fact that the MM may get restarted every so often would be to create a "shown_images" folder next to "images" and move each photo there after it's shown. When the module gets to the point of an empty images folder, it moves the contents of "shown_images" back to "images".

For those that need a workaround in the meantime, I have taken to doing the above manually by starting my MM with the command cd ~/MagicMirror && DISPLAY=:0 npm start | tee >( grep --line-buffered 'BACKGROUNDSLIDESHOW: reading path' >> bgss-log.txt ) This keeps track of what images have been shown and I can then go in every few weeks and manually move those to my "shown_images" folder. This doesn't prevent repeat images, but at least it allows me to get to the bottom of the pile.