Delayed start of addons

cp /usr/lib/systemd/system/kodi-autostart.service /storage/.config/system.d
and edit file /storage/.config/system.d/kodi-autostart.service

But I doubt this would work because autostart will be just skipped.

Put this in autostart.sh and it will delay starting kodi until path exist. Or 15 sec max.

cnt=1
while [ $cnt -lt 15 ]; do
  if [ -d /var/media/USBHDD/recordings ]; then
    sleep 2
    break
  fi
  
  let cnt=cnt+1 
  sleep 1
done

Also create folder /storage/.kodi/addons/driver.dvb.delay_mount/bin and create file /storage/.kodi/addons/driver.dvb.delay_mount/bin/userspace-driver.sh with content

cnt=1
while [ $cnt -lt 15 ]; do
  if [ -d /var/media/USBHDD/recordings ]; then
    break
  fi
  
  let cnt=cnt+1 
  sleep 1
done

This will delay starting tvheadend addon until path exist.

One other option would be to restart PVR client from userspace-driver.sh.

1 Like