livescores.py 文件源码

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

项目:script.matchcenter 作者: enen92 项目源码 文件源码
def onInit(self):
        xbmc.log(msg="[Match Center] Script started", level=xbmc.LOGDEBUG)
        if os.path.exists(ignored_league_list_file):
            self.ignored_leagues = [league.lower() for league in eval(FileIO.fileread(ignored_league_list_file)) if league] 
        else:
            self.ignored_leagues = []
        xbmc.executebuiltin("ClearProperty(no-games,Home)")
        self.getControl(32540).setImage(os.path.join(addon_path,"resources","img","goal.png"))
        xbmc.executebuiltin("SetProperty(loading-script-matchcenter-livescores,1,home)")
        self.livescoresThread()
        xbmc.executebuiltin("ClearProperty(loading-script-matchcenter-livescores,Home)")
        i = 0
        while self.isRunning:
            if (float(i*200)/(livescores_update_time*60*1000)).is_integer() and ((i*200)/(3*60*1000)) != 0:
                self.livescoresThread()
            xbmc.sleep(200)
            i += 1
        xbmc.log(msg="[Match Center] Script stopped", level=xbmc.LOGDEBUG)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号