def checkUpdate(): BUILDNAME = wiz.getS('buildname') BUILDVERSION = wiz.getS('buildversion') bf = wiz.textCache(BUILDFILE) if bf == False: return link = bf.replace('\n', '').replace('\r', '').replace('\t', '') match = re.compile( 'name="%s".+?ersion="(.+?)".+?con="(.+?)".+?anart="(.+?)"' % BUILDNAME).findall(link) if len(match) > 0: version = match[0][0] icon = match[0][1] fanart = match[0][2] wiz.setS('latestversion', version) if version > BUILDVERSION: if DISABLEUPDATE == 'false': wiz.log( "[Check Updates] [Installed Version: %s] [Current Version: %s] Opening Update Window" % (BUILDVERSION, version), xbmc.LOGNOTICE) notify.updateWindow(BUILDNAME, BUILDVERSION, version, icon, fanart) else: wiz.log( "[Check Updates] [Installed Version: %s] [Current Version: %s] Update Window Disabled" % (BUILDVERSION, version), xbmc.LOGNOTICE) else: wiz.log( "[Check Updates] [Installed Version: %s] [Current Version: %s]" % (BUILDVERSION, version), xbmc.LOGNOTICE) else: wiz.log( "[Check Updates] ERROR: Unable to find build version in build text file", xbmc.LOGERROR)
def checkUpdate(): BUILDNAME = wiz.getS('buildname') BUILDVERSION = wiz.getS('buildversion') bf = wiz.textCache(BUILDFILE) if bf == False: return link = bf.replace('\n','').replace('\r','').replace('\t','') match = re.compile('name="%s".+?ersion="(.+?)".+?con="(.+?)".+?anart="(.+?)"' % BUILDNAME).findall(link) if len(match) > 0: version = match[0][0] icon = match[0][1] fanart = match[0][2] wiz.setS('latestversion', version) if version > BUILDVERSION: if DISABLEUPDATE == 'false': wiz.log("[Check Updates] [Installed Version: %s] [Current Version: %s] Opening Update Window" % (BUILDVERSION, version), xbmc.LOGNOTICE) notify.updateWindow(BUILDNAME, BUILDVERSION, version, icon, fanart) else: wiz.log("[Check Updates] [Installed Version: %s] [Current Version: %s] Update Window Disabled" % (BUILDVERSION, version), xbmc.LOGNOTICE) else: wiz.log("[Check Updates] [Installed Version: %s] [Current Version: %s]" % (BUILDVERSION, version), xbmc.LOGNOTICE) else: wiz.log("[Check Updates] ERROR: Unable to find build version in build text file", xbmc.LOGERROR)