autoexec.py not working since last update

  • Hello everyone.

    It is very important to me that my three Libreelec machines start playing music upon startup. With an earlier version, this worked with an autoexec.py located in /storage/.kodi/userdata.

    When immigrating to Matrix, I had to install an addon called "service.autoexec" with an autoexec.py in its folder. So far, so unnecessarily complicated.

    Yes, I have been warned that some things won't work when automatically upgrading to Nexus, but that doesn't help much right now as there seem to be no viable solution to simply start playing some MP3 folder upon startup?

    Does anyone know how I can do this in Nexus? That would be very, very much appreciated.

  • The normal instruction would be to install the autoexec service add-on. You also need to ensure that the autoexec.py script works. If it doesn't perhaps the wrong commands are used? .. which should be visible in a Kodi debug log.

  • there seem to be no viable solution to simply start playing some MP3 folder upon startup?

    I had to install an addon called "service.autoexec" with an autoexec.py in its folder. So far, so unnecessarily complicated.

    You are basically answering your own question.. "viable solution" is "service.autoexec"..

    What did you try till now?

  • Thank you, Mario77. Service.autoexec works fine, indeed. The problem is that all of the sudden, the ,isdir parameter isn't recognized anymore, I can only address files, no folders anymore. Anyone knows about a syntax change? Thanks!

  • Just for your information from someone who doesn't know how to write code. I tried everything with no success until I asked ChatGPT: "what is the autoexec.py's content when I want to play a whole folder of mp3s?"

    It gave me this with is the solution I've been looking for since the update:

    If you want to play a whole folder of MP3 files using an autoexec.py script in Kodi, you can use the following example as a starting point:

    In this example:

    1. Replace "/storage/.kodi/media/MyMusicFolder" with the actual path to the folder containing your MP3 files.
    2. The script uses the os.listdir function to get a list of all files in the specified folder that have the .mp3 extension.
    3. It then creates a playlist using xbmc.PlayList(xbmc.PLAYLIST_MUSIC) and adds each MP3 file to the playlist using the add method.
    4. Finally, it uses xbmc.Player().play(playlist) to play the playlist.