Run Script on Kodi Exit?
#1
I've been fine tuning my Android TV box and have it working fairly well after loading custom firmware, replacing a library file, installing a custom version of Kodi, etc. One of the issues, though, is that the gui settings are often lost when rebooting (apparently due to cache clearing, specific to Android). I have created an Android script to copy the guisettings.xml file to a temporary file location, and another script to automatically copy it back to the Kodi userdata folder on reboot to ensure that the settings are put back. However, each time that I make a change to the gui settings, I have to manually run the first script to backup the current settings. Is there any way that I can trigger the initial copy script based on shutdown/close of Kodi so I don't have to manually run the script to save the changes? I've been googling for a few days and haven't found a viable method.

Any thoughts would be greatly appreciated!
Reply
#2
I would try to fix the root issue, but to answer your question:

I would replace the default quit button(depends on the skin ) with a script that did the backup and then issues the quit command.
Reply
#3
Thanks. Unfortunately, all of my research into the issue hasn't led to any solutions for the underlying problem. It's apparently fairly common and was also touched on in the thread below:

http://forum.kodi.tv/showthread.php?tid=198428

At any rate, I'll do some research into adjusting the default quit button action in lieu of solving the root of the issue, but I'll also try to replicate the problem and dig through the log file to see if it's captured anywhere. Thanks for the help!
Reply

Logout Mark Read Team Forum Stats Members Help
Run Script on Kodi Exit?0