2013-11-23, 04:57
Hello all,
I would like to copy some setting files when XBMC is running.
These files will automaticly be rewritten by XBMC so i wonder if there is a way to force exit/terminate?
This way XBMC will read the setting files on the next startup and will use them.
My questing is can we terminate XBMC (force exit) from python?
I hope there is a way, making a one time crash to force exit would also help me a lot :S
The goal is to change the gui settings wich can not be rewritten when XBMC is running.
The files are copied and looking good when XMBC is running but when i close XBMC the xml files are automaticly rewritten, i would like to avoid that.
I am running Gotham-Alpha-9 on Android.
I tried to load an .sh from python script but without root that does not work.
i am working with an autoexec.py in userdata path.
Any suggestions?
Thanks
I would like to copy some setting files when XBMC is running.
These files will automaticly be rewritten by XBMC so i wonder if there is a way to force exit/terminate?
This way XBMC will read the setting files on the next startup and will use them.
My questing is can we terminate XBMC (force exit) from python?
I hope there is a way, making a one time crash to force exit would also help me a lot :S
The goal is to change the gui settings wich can not be rewritten when XBMC is running.
The files are copied and looking good when XMBC is running but when i close XBMC the xml files are automaticly rewritten, i would like to avoid that.
I am running Gotham-Alpha-9 on Android.
I tried to load an .sh from python script but without root that does not work.
i am working with an autoexec.py in userdata path.
Code:
import xbmc, xbmcgui, os, sys
import xbmcvfs
#import android
file = xbmc.translatePath( 'special://home/userdata/guisettings.xml' )
fileb = xbmc.translatePath( 'special://home/userdata/guisettings.xml.bak' )
def delete_file(file):
if xbmcvfs.exists(fileb):
xbmcvfs.delete(file)
xbmc.sleep( 5000 )
xbmcvfs.copy(os.path.join( xbmc.translatePath( 'special://home/userdata/' ), 'guisettings.xml.bak'), os.path.join( xbmc.translatePath( 'special://home/userdata/' ), 'guisettings.xml'))
xbmc.sleep( 5000 )
xbmcvfs.delete(fileb)
delete_file(file)
xbmc.sleep( 10000 )
// here XBMC needs to exit for a restart.....
Any suggestions?
Thanks