bityouth.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:pelisalacarta-ce 作者: pelisalacarta-ce 项目源码 文件源码
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()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号