I bought my Slice to run image slideshows from my library of 25,000 photographs and play mp3 music, but was very disappointed to discover that when given a few thousand pictures, Slice [Kodi] constantly crashed, locked up solid and required a power-recycle to reboot.
After some experiments I have managed to get the slideshow to run using all 25,000 of my photos (almost).
Hope this may help anyone needing a similar solution.
- Exclude photos > 6mb
- Remove any photos that fail Perl::Exif parsing
- Break photos into 31 ‘daily’ directories
- Only run slideshow on the current ‘days’ photo directory (!> 830 pics per day’s slideshow)
- Set slideshow Time to display each image to !< 20 seconds
Usual caveats apply if you want to try this yourself!
Not all these steps may be necessary to get this to work but this is what I did and it’s now working for me.
I limited the maximum size of photos to 6mb, it seemed to work and I don’t have many over that size.
I found around 40 of my photos would cause Perl’s Image::Exif parser to crash [completely - no return], so assuming that they might crash Kodi, I identified them and removed them from the slideshow.
On the Slice I randomly split my 25,000 photos into 31 ‘daily’ directories [ 1 … 31 ], each containing 830 unique photos.
Create an autoboot.py file so the Slice automatically runs a random slideshow on that [numbered] days picture directory when booted up.
Create a cron job so the Slice reboots daily, at midnight, thus loading the new day’s slideshow.
Set the slideshow Time to display each image to 20 seconds. It might be possible to lower this with experimentation but even with the limits above, the box crashed very quickly if the Time to display each image was set to 1 second.
This setup has now been running ok for 2 days without a problem, bearing in mind the nightly reboot, for me, this is a fix.
I still need to find a way to switch to the audio player while the auto-loaded slideshow is running and be able to pause and next track the audio without interrupting the slide show.
If I can get that to work, I’ll buy another Slice for the living room!
Autostart Kodi slideshow on Slice reboot
# import required modules import xbmc, datetime # get today's day in month number today = datetime.date.today() d = today.day # stringify day_of_month = datetime.datetime.now().strftime("%d") # set path to current day's slideshow slideshow_path ='/media/Slice-HD/31_days_pictures/'+day_of_month # run slide show xbmc.executebuiltin("SlideShow("+slideshow_path+",random)")
Reboot Slice 01:01 nightly
01 01 * * * /usr/sbin/reboot