what's wrong with my autoexec.py script? - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111) +---- Forum: OS independent / Other (https://forum.kodi.tv/forumdisplay.php?fid=228) +---- Thread: what's wrong with my autoexec.py script? (/showthread.php?tid=343378) |
what's wrong with my autoexec.py script? - griffindodd - 2019-04-26 libreelec 9.0.1/kodi 18 I have created my autoexec.py file and placed it in... /storage/.kodi/userdata/ I'm trying to just start a recurring slideshow using the contents of my picture folder in the default location... Code: import xbmc I'm assuming I have my pathing wrong, but can't work it out. On restart Kodi does nothing RE: what's wrong with my autoexec.py script? - trogggy - 2019-04-26 The script looks fine to me. Enable debug logging restart kodi paste the log somewhere and link to it here RE: what's wrong with my autoexec.py script? - griffindodd - 2019-04-26 (2019-04-26, 23:04)trogggy Wrote: The script looks fine to me.Log is here.... https://hastebin.com/nezamobehu.bash The only error I can find is a pathing one but not sure why... Code: 2019-04-26 21:19:24.602 T:139763865540736 ERROR: GetDirectory - Error getting /pictures RE: what's wrong with my autoexec.py script? - snoopyjoe - 2019-04-27 @griffindodd try putting the URL in quotes. From: xbmc.executebuiltin(RecursiveSlideShow(/storage/.kodi/pictures/)) To: xbmc.executebuiltin(RecursiveSlideShow("/storage/.kodi/pictures/")) I have a service add-on that performs a task at boot and had to code it that way. RE: what's wrong with my autoexec.py script? - trogggy - 2019-04-27 If snoopyjoe's suggestioin doesn't work I'd try running autoexec.py from a favourite or remote / keyboard key. So eg add a line to favourites.xml: <favourite name="Run autoexec" >RunScript(special://masterprofile/autoexec.py)</favourite> RE: what's wrong with my autoexec.py script? - griffindodd - 2019-04-29 (2019-04-27, 01:45)snoopyjoe Wrote: @griffindodd try putting the URL in quotes. Unfortunately no difference, I get the same error in the log, I wonder if it's because the pictures directory is within the hidden .kodi directory ? I have to be able to use a directory that I can access via SMB as I am using this as a sign where I will be changing the content remotely. RE: what's wrong with my autoexec.py script? - griffindodd - 2019-04-29 OK I was having a massive 'DERP' moment - editing the script across samba was NOT applying my changes even though it looked like they were sticking when viewing them in a code editor so yeah that happened. any wayyyyyyyyy, returning to the original script and syntax (it doesn't like adding the quotes around the path - throws a syntax error)... Code: import xbmc I don't get any errors in the log, in fact I get confirmation that the script ran successfully without error... Code: 2019-04-29 17:22:59.858 T:139920404363008 INFO: CPythonInvoker(2, /storage/.kodi/userdata/autoexec.py): script successfully run and yet, the slideshow still doesn't even run, so now I'm super stumped. RE: what's wrong with my autoexec.py script? - griffindodd - 2019-04-29 trying a different approach I'm still seeing some weird pathing issues (remember this is a libreelec install) Code: # Autoplay videodirectory I get a 'no such file or directory error when trying to use any of the following paths to the directory... /storage/.kodi/pictures/ /storage/kodi/pictures/ /storage/.kodi/pictures /storage/kodi/pictures sources://pictures/ RE: what's wrong with my autoexec.py script? - griffindodd - 2019-04-29 I FINALLY worked it out... Code: import xbmc no idea why the pathing works like this with the kodi install folder left out, but that was the simple answer RE: what's wrong with my autoexec.py script? - trogggy - 2019-04-29 (2019-04-29, 20:05)griffindodd Wrote: I FINALLY worked it out.../storage/.kodi/pictures and /storage/pictures are completely different paths. One (that works) is a pictures folder in the root of storage. The other isn't. RE: what's wrong with my autoexec.py script? - griffindodd - 2019-04-29 (2019-04-29, 20:18)trogggy Wrote:(2019-04-29, 20:05)griffindodd Wrote: I FINALLY worked it out.../storage/.kodi/pictures and /storage/pictures are completely different paths. Aye, I guess the way the samba shares appear is confusing as the pictures directory shows alongside the userdata directory which is inside /.kodi/ but thinking on it, the shares could be at any potential location - ah well you live and learn. RE: what's wrong with my autoexec.py script? - trogggy - 2019-04-29 I can see how that could be confusing. It's a long time since I've used the default shares - job 1 on install for me is usually to edit samba.conf.sample in the .configfiles share. RE: what's wrong with my autoexec.py script? - DarrenHill - 2019-04-29 If it makes it any clearer, this is what my LE Pi has in the storage folder (via ls -al from an ssh terminal session): Code: drwxr-xr-x 22 root root 1024 Apr 26 07:29 . As you can see, all the media folders (videos, pictures, tvshows, music, emulators) are at the same level as the .kodi folder, and not inside it. Edited to correct the above statement - wrote userdata (wiki) but meant .kodi RE: what's wrong with my autoexec.py script? - trogggy - 2019-04-29 (2019-04-29, 23:10)DarrenHill Wrote: If it makes it any clearer, this is what my LE Pi has in the storage folder (via ls -al from an ssh terminal session): I'm not seeing that. Userdata is at /storage/.kodi/userdata. Media folders are in the root of storage. RE: what's wrong with my autoexec.py script? - DarrenHill - 2019-04-30 @trogggy - the above is the content of the storage folder. The media folders are there, so agrees with that (the "Media folders are in the root of storage." comment). Editted to add - I see what you mean. You are correct, my last statement is wrong. I will correct it (was written on the fly as I was headed out the door). The media folders are in the storage folder, at the same level as the .kodi folder (which itself contains the userdata (wiki) one). |