- Official Post
You mucked something. Or you have files on your drive that crash kodi. Unplug all usb drives and SD cards and see if you think still crashes. If it does then something else is wrong that isn't related to this script.
You mucked something. Or you have files on your drive that crash kodi. Unplug all usb drives and SD cards and see if you think still crashes. If it does then something else is wrong that isn't related to this script.
You mucked something. Or you have files on your drive that crash kodi. Unplug all usb drives and SD cards and see if you think still crashes. If it does then something else is wrong that isn't related to this script.
Re-tested and eliminated all other possible issues from the equation. Still crashes and then reboots even when running headless or running with HDMI video out only and no extra peripherals.
I am traveling and away from my LibreElec setup. I'll let you know the results by this weekend.
I deleted the /storage/.config/udev.rules.d/99-usb-play.rules file and also the /storage/autoplay.sh file and then I was able to boot.
I SSH to LibreElec and then re-created everything from scratch.
Then I ran the autoplay.sh file as you instructed. I made sure both file permissions were 777.
It automatically ran the contents from the USB drive fine which is a success.
However, the mini sub-window (pop-up) that appears after inserting a USB drive asking me to play video, audio etc. from the newly inserted drive remained on the screen. I had to click on cancel for that to go away. There should be a way to suppress that sub-window (pop-up) when running fully peripheral-less.
Then I rebooted.
It went back to the infinite loop of booting up to the Jarvis logo and then crashing again and again.
I kept it on for 10 minutes and it never stopped crashing and rebooting.
Same crashing issue as mentioned before.
can you unplug the usb drive, let it boot up so kodi is running, then plug the usb drive back in?
can you unplug the usb drive, let it boot up so kodi is running, then plug the usb drive back in?
I disconnected the peripherals such as the USB drive, WiFi dongle, keyboard, mouse and then finally disconnected the USB hub - one by one - and retried more than 50 times. It crashes after showing the Jarvis splash/logo screen and briefly showing the GUI background image. Now, it stays off after crashing a few times. It does not try to reboot again and again into an infinite loop anymore.
BTW, I am a hobbyist and not getting paid for this. So, my sincere apologies if I cannot respond to the postings in this forum right away due to my day job.
I disconnected the peripherals such as the USB drive, WiFi dongle, keyboard, mouse and then finally disconnected the USB hub - one by one - and retried more than 50 times. It crashes after showing the Jarvis splash/logo screen and briefly showing the GUI background image. Now, it stays off after crashing a few times. It does not try to reboot again and again into an infinite loop anymore.
BTW, I am a hobbyist and not getting paid for this. So, my sincere apologies if I cannot respond to the postings in this forum right away due to my day job.
Any fix?
just came across this thread -- here's the fix:
a. in udev rules, make sure the command is on a single line (see udev - Debian Wiki) before the backslash ('\') e.g.
IMPORT{builtin}="blkid" ACTION=="add", SUBSYSTEM=="block", KERNEL=="sda*", ENV{ID_FS_USAGE}=="filesystem", \
RUN+="/usr/bin/systemd-run /storage/autoplay.sh /dev/%k"
The original code in the thread pastes into several lines -- this is what caused boot loop most likely.
b. the autorun.sh needs to start with #!/bin/sh -- otherwise systemd fails to run it. Thing is, this vital line was eaten by the forum parsing code. Try posting a code block here starting with '#'
Thank for this cool feature. I ran into the issue that a vfat volume with a space in the label didn't start the auto-play. For now the quick fix is removing the space...
Yes, the mount point has to be unescaped. I've updated #12.
Just for Leia Version
#nano ~/.kodi/userdata/autoexec.py
import xbmc,os
caminho=os.popen("(mount | grep -i '/dev/sda1' | cut -d ' ' -f 3)").read().replace('/var','').strip()
xbmc.executebuiltin('xbmc.PlayMedia("{0}","isdir")'.format(caminho))
xbmc.executebuiltin('xbmc.PlayerControl(RepeatAll)')
#chmod +x ~/.kodi/userdata/autoexec.py
#reboot