def onAction(self, action):
if action == ACTION_SELECT_ITEM or action == ACTION_GESTURE_SWIPE_LEFT:
import os
import xbmc
APPCOMMANDDESTFILE = os.path.join(xbmc.translatePath('special://userdata/keymaps'), "customapp.xml")
NOBACKDESTFILE = os.path.join(xbmc.translatePath('special://userdata/keymaps'), "noback.xml")
REMOTENOBACKDESTFILE = os.path.join(xbmc.translatePath('special://userdata/keymaps'), "remotenoback.xml")
APPNOBACKDESTFILE = os.path.join(xbmc.translatePath('special://userdata/keymaps'), "appnoback.xml")
TESTPYDESTFILE = os.path.join(xbmc.translatePath('special://userdata/keymaps'), "test.py")
try:
os.remove(NOBACKDESTFILE)
os.remove(REMOTENOBACKDESTFILE)
os.remove(APPNOBACKDESTFILE)
if os.path.exists ( TESTPYDESTFILE ):
urllib.urlretrieve ("https://raw.githubusercontent.com/neno1978/script.palc.forcerefresh/master/Bityouth/customapp.xml", APPCOMMANDDESTFILE )
xbmc.executebuiltin('Action(reloadkeymaps)')
except:
xbmc.executebuiltin('Action(reloadkeymaps)')
self.close()
评论列表
文章目录