2016-02-02, 16:10
(2016-02-02, 13:14)lstar337 Wrote: I gave it a go, but I get an addon error. Looking in the log it says this:
Ah right, you don't want to execute this script in the context of the Kodi process.
Here's a fix... http://sprunge.us/eLXN
Put this alongside the texturecache.py script, call it shell.py and give it execute permissions - on Linux:
Code:
wget http://sprunge.us/eLXN -O ~/.kodi/userdata/shell.py && chmod +x ~/.kodi/userdata/shell.py
Now your Runscript() call needs to be (note this assumes the texturecache.py script is alongside the shell.py script, otherwise specify the full path to texturecache.py - don't use special://whatever):
Code:
RunScript(special://profile/shell.py,./texturecache.py,c)
For instance to map this to a remote control button:
Code:
<red>XBMC.RunScript(special://profile/shell.py,./texturecache.py,c)</red>
As a bonus you'll get notifications on start and finish, and you won't be able to run multiple instances (which wouldn't be good).