delayed Autostart Kodi

  • HELLO,


    i use libreelec for my kodi setup.

    i create a epg file and changed the autostart.sh as follow :

    Code
    wget http://XXXX:XXXXX@XXXXX/guide-zatoo.xml -O /storage/.kodi/userdata/guide-zatoo.xml

    i download a 20MB file for my EPG on autostart, but i had the problem its to slow for the autostart, i tested it with a 9MB file that works great.

    Kodi checks on startup is the file "guide-zatoo.xml" available, and the pvr addon use it.

    can i make a sleep or wait or something of 10 seconds, that he can download the file and then kodi starts?


    THX

    • Official Post

    You can delay when autostart.sh runs, but you cannot control when it finishes or the sequence with Kodi start.

    If you move commands to a systemd .service file in /storage/.config/system.d/ you can control the sequencing, e.g.

    I won't guarantee this ^ will work as I'm no systemd expert, but "After=network-online.target nss-lookup.target" ensures the network is up, and then "WantedBy=multi-user.target" ensures it runs before Kodi startup.

  • You can delay when autostart.sh runs, but you cannot control when it finishes or the sequence with Kodi start.

    If you move commands to a systemd .service file in /storage/.config/system.d/ you can control the sequencing, e.g.

    I won't guarantee this ^ will work as I'm no systemd expert, but "After=network-online.target nss-lookup.target" ensures the network is up, and then "WantedBy=multi-user.target" ensures it runs before Kodi startup.

    thx for the reply.

    is this on only libreelec kompatible?

    i want to use this on my firetv too.

    there i only can use the autostart file (autoexec.py) of Kodi, is this in the "autoexec.py" compatible?

    • Official Post

    i want to use this on my firetv too.

    there i only can use the autostart file (autoexec.py) of Kodi, is this in the "autoexec.py" compatible?

    Try this autostart.sh:

    Bash
    #!/bin/sh
    
    wget http://XXXX:XXXXX@XXXXX/guide-zatoo.xml -O /storage/.kodi/userdata/guide-zatoo.xml
    systemctl restart kodi

    PS: Should be guide-zattoo.xml, maybe spelling error on your code.