Ejemplo n.º 1
0
def PlayChannelByID(chID=None, fromFav=False, channel=None):
	try:
		if channel is None:
			channel = common.ReadList(FAV)[int(chID)] if fromFav else common.GetChannelByID(chID)
		categoryID = 'Favourites' if fromFav else channel["group"]
		PlayChannel(channel["url"], channel["name"].encode("utf-8"), channel["image"].encode("utf-8"), categoryID)
	except Exception as ex:
		xbmc.log(str(ex), 3)
Ejemplo n.º 2
0
def ChannelGuide(chID, categoryID):
    epg = common.GetGuide(categoryID)
    if categoryID == 'Favourites':
        channel = common.ReadList(FAV)[int(chID)]
    else:
        channel = common.GetChannelByID(chID)
    channelName = channel["name"].encode("utf-8")
    programmes = GetProgrammes(epg, channelName, full=True)
    ShowGuide(programmes, channelName, channel["image"].encode("utf-8"))
Ejemplo n.º 3
0
channelID = params.get('channelid')
categoryID = params.get('categoryid')

#xbmc.log("----> {0}".format(sys.argv), 5)
#xbmc.log("----> Mode: {0}".format(mode), 5)
#xbmc.log("----> IconImage: {0}".format(iconimage), 5)
#xbmc.log("----> categoryID: {0}".format(categoryID), 5)
#xbmc.log("----> channelID: {0}".format(channelID), 5)

updateList = False

if mode is None:
    if channelID is None:
        CATEGORIES()
    else:
        item = common.GetChannelByID(channelID)
        type = item.get('type', '')
        if type == 'video' or type == 'audio':
            PlayChannelByID(channel=item)
        elif type == 'playlist':
            ListLive(catChannels=item["list"], showSearch=True)
    updateList = True
elif mode == '1' or mode == '10':
    updateList = PlayChannelByID(chID=channelID)
elif mode == '2':
    ListLive(categoryID=channelID, iconimage=iconimage, showSearch=True)
    updateList = True
elif mode == '3':
    ListLive(categoryID=categoryID, iconimage=iconimage, chID=channelID)
    updateList = True
elif mode == '4':