def start(): if SERVICE_START.getSetting('timeZone') == 'NO': work = False else: isFILE = '' work = True noPLAY = False epgYes = True waitAbort = xbmc.Monitor() if SERVICE_START.getSetting('autoSetupPVR') == 'true': setupIPTVsimple() SERVICE_START.setSetting('autoSetupPVR', 'false') if SERVICE_START.getSetting('autoSetupTV') == 'true': startSetupIPTV() while work: if xbmc.abortRequested or waitAbort.waitForAbort(TIMER): break else: if not os.path.exists(pathFileEPG): timeEpg = True else: timeEpg = int( (time.time() - os.stat(pathFileEPG).st_mtime) / 3600) > 21 if timeEpg: if epgYes: dialogYES_NO = xbmcgui.Dialog() if dialogYES_NO.yesno(SERVICE_EPG, CREATE_EPG): epgTV.createEpg() stopPlayer() restartPvr() else: epgYes = False try: fileNAME = xbmc.Player().getPlayingFile() if fileNAME.find('.pvr') != -1: if isFILE != fileNAME: isFILE = fileNAME noPLAY = True elif noPLAY: noPLAY = False except: if noPLAY: strIndex = re.findall('[0-9]+', isFILE) if not testProxy(strIndex[0]): startSetupIPTV() noPLAY = False epgYes = True isFILE = '' else: noPLAY = False
def start(): if SERVICE_START.getSetting('timeZone') == 'NO': work = False else: isFILE = '' work = True noPLAY = False epgYes = True waitAbort = xbmc.Monitor() if SERVICE_START.getSetting('autoSetupPVR') == 'true': setupIPTVsimple() SERVICE_START.setSetting('autoSetupPVR', 'false') if SERVICE_START.getSetting('autoSetupTV') == 'true': startSetupIPTV() while work: if xbmc.abortRequested or waitAbort.waitForAbort(TIMER): break else: if not os.path.exists(pathFileEPG): timeEpg = True else: timeEpg = int((time.time() - os.stat(pathFileEPG).st_mtime) / 3600) > 21 if timeEpg: if epgYes: dialogYES_NO = xbmcgui.Dialog() if dialogYES_NO.yesno(SERVICE_EPG, CREATE_EPG): epgTV.createEpg() stopPlayer() restartPvr() else: epgYes = False try: fileNAME = xbmc.Player().getPlayingFile() if fileNAME.find('.pvr') != -1: if isFILE != fileNAME: isFILE = fileNAME noPLAY = True elif noPLAY: noPLAY = False except: if noPLAY: strIndex = re.findall('[0-9]+', isFILE) if not testProxy(strIndex[0]): startSetupIPTV() noPLAY = False epgYes = True isFILE = '' else: noPLAY = False
def createEPG(): epgTV.createEpg() stopPlayer() restartPvr()