[SOLVED] Autostart a slideshow on boot

  • I'm trying to figure out how to autostart a slideshow when I restart my RPi 3 Model B running LibreELEC.

    I've created a file called autoexec.py in /storage/.kodi/userdata containing the single line below. This works fine as long as I run autoexec.py manually but after what I've been reading this file should be automatically executed during boot. That doesn't seem to happen in my case.

    kodi-send --action="RecursiveSlideShow(/var/media/WD1T/Fotoramen)"

    Another thing I don't understand is what the correct syntax should be to start the slideshow from within the script. Reason for my question is I've found the line above to work just fine - both when executed manually from the CLI or by running the script. However, I read the syntax to run built-in Kodi functions from within a python scrips is something like this:

    xbmc.executebuiltin('XBMC.RecursiveSlideShow(/var/media/WD1T/Fotoramen)')

    Executing that gives me a syntax error when trying to run the autoexec.py script manually.

    So...to me it looks using the first line is the way to go. Remaining question is why the script doesn't execute automatically during a reboot.

    Thanks in advance for any help!

  • I can now answer my own question...below is exactly what needs to be in autoexec.py to automatically start Kodi at reboot.

    import xbmc

    xbmc.executebuiltin('RecursiveSlideShow(Path to your media)')