Пример #1
0
def CheckUpdates():
    isListsChanged = common.UpdateLists()
    if isListsChanged:
        print "------------> IsraeLive service: Channel-list updated. <---------------"

    myIPTVSimple.UpdateLogos()

    isIPTVChanged = False
    isEPGChanged = False

    if Addon.getSetting("useLiveTV") == "true":
        isIPChanged = myIPTVSimple.isIPChange()
        m3uFileLastUpdate = myIPTVSimple.getM3uFileLastUpdate()
        now = int(time.time())
        isM3uFileNotUpdate = True if (
            now - m3uFileLastUpdate) > 82800 else False  # 23 hours
        if isListsChanged or isIPChanged or myIPTVSimple.isMarkedListsChange(
        ) or isM3uFileNotUpdate:
            isIPTVChanged = myIPTVSimple.RefreshIPTVlinks()
            if isIPTVChanged:
                print "-------------> IsraeLive service: IPTV-links updated. <----------------"
            else:
                print "----------> IsraeLive service: error updating IPTV-links. <------------"
        isEPGChanged = myIPTVSimple.RefreshEPG()
        if isEPGChanged:
            print "-------------> IsraeLive service: TV-Guide updated. <-----------------"

    if isIPTVChanged or isEPGChanged:
        xbmc.executebuiltin('StartPVRManager')
    elif isListsChanged:
        pass
    else:  # if nothing changed
        print "--------> IsraeLive service: Everything is up to date. :-) <-----------"
Пример #2
0
def CheckUpdates():
    isListsChanged = common.UpdateLists()
    if isListsChanged:
        print "------------> IsraeLive service: Channel-list updated. <---------------"

    myIPTVSimple.UpdateLogos()

    isIPTVChanged = False
    isEPGChanged = False

    if Addon.getSetting("useLiveTV") == "true":
        isIPChanged = myIPTVSimple.isIPChange()
        if isListsChanged or isIPChanged or myIPTVSimple.isMarkedListsChange():
            isIPTVChanged = myIPTVSimple.RefreshIPTVlinks()
            if isIPTVChanged:
                print "-------------> IsraeLive service: IPTV-links updated. <----------------"
            else:
                print "----------> IsraeLive service: error updating IPTV-links. <------------"
        isEPGChanged = myIPTVSimple.RefreshEPG()
        if isEPGChanged:
            print "-------------> IsraeLive service: TV-Guide updated. <-----------------"

    if isIPTVChanged or isEPGChanged:
        dlg = xbmcgui.Dialog()
        dlg.ok('ISRAELIVE', 'Links updated.', "Please restart XBMC or PVR db.")
    elif isListsChanged:
        pass
    else:  # if nothing changed
        print "--------> IsraeLive service: Everything is up to date. :-) <-----------"
Пример #3
0
def UpdateTVChannels():
	global tvCounter
	global tvThread
	result = False
	try:
		channels_list = annatel.GetTVChannels()
		if (channels_list is not None):
			myIPTVSimple.RefreshIPTVlinks(channels_list)
		result = (channels_list is not None)
	except:
		result = False
	if (result):
		tvCounter = __UpdateInterval__
	else:
		tvCounter = __RetryInterval__
	tvThread = None
Пример #4
0
    iconimage = urllib.unquote_plus(params["iconimage"])
except:
    pass
try:
    mode = int(params["mode"])
except:
    pass
try:
    description = urllib.unquote_plus(params["description"])
except:
    pass

if mode == None or url == None or len(url) < 1:
    Categories()
elif mode == 1:
    Category(url)
elif mode == 2:
    PlayUrl(name, url, iconimage)
elif mode == 3:
    PlayFilmon(url)
elif mode == 10:
    SettingsCat()
elif mode == 11:
    Addon.openSettings()
elif mode == 12:
    if myIPTVSimple.RefreshIPTVlinks():
        xbmc.executebuiltin('StartPVRManager')
        #common.OKmsg("IsraeLIVE", "Links updated.", "Please restart XBMC or PVR db.")

xbmcplugin.endOfDirectory(int(sys.argv[1]))
Пример #5
0
def RefreshIPTVlinks():
    if myIPTVSimple.RefreshIPTVlinks():
        xbmc.executebuiltin('StartPVRManager')