示例#1
0
def drawSplive(page):
    mode = 4
    jsonChannels = Spliveappcom.getChannels(page)
    image = icon
    for item in jsonChannels:
        try:
            logger.debug("trying splive item...")
            # title = urllib.unquote_plus(item["title"].decode('iso-8859-1', 'ignore'))
            title = item["title"]
            link = item["link"]
            referer = "splive"
            if item.has_key("permaLink"):
                mode = 111
                if item.has_key("referer"):
                    referer = item["referer"]
                    logger.info("referer is: " + referer)
            if item.has_key("thumbnail"):
                image = item["thumbnail"]
                logger.info("detected img: " + image)
            else:
                image = icon
            add_dir(title, link, mode, image, referer, link)
        except:
            logger.error("Something goes wrong with SPLIVEAPP drawer")
            pass
示例#2
0
def drawVipracinginfo(page):
    jsonChannels = Vipracinginfo.getChannels(page)
    mode = 107
    for item in jsonChannels:
        title = item["title"]
        link = item["link"]
        add_dir(title, link, mode, icon, "vipracinginfo", link)
示例#3
0
def drawSportstream365(page):
    mode = 110
    jsonChannels = Sportstream365com.getChannels(page)
    for item in jsonChannels:
        title = item["title"]
        link = item["link"]
        image = icon
        add_dir(title, link, mode, image, "sportstream365com", link)
示例#4
0
def drawZonasportsme(page):
    mode = 109
    jsonChannels = Zonasportsme.getChannels(page)
    for item in jsonChannels:
        title = item["title"]
        link = item["link"]
        image = icon
        add_dir(title, link, mode, image, "zonasportsme", link)
示例#5
0
def drawXspf(html,icon=''):
	lists = common.parseDOM(html,"track") #rusian acelive format
	if len(lists)>0:
		for item in lists:
			name = common.parseDOM(item,"title")[0].encode("utf-8")
			value = common.parseDOM(item,"location")[0].encode("utf-8")
			logger.info("Added: "+name+", url: "+value)
			add_dir(name, value, 2, icon,'', 0)
示例#6
0
def drawPastebinCom():
    param = urllib.quote_plus(str(XBMCUtils.getSettingFromContext(sys.argv[1], "pastebin_param")))
    logger.debug("extracted param to be searched: " + param)
    channels = Pastebin.searchLists(param=param)
    logger.debug("items obtained: " + str(len(channels)))
    level = 1
    for channel in channels:
        add_dir(channel["title"], channel["link"], level, "", "pastebincom", channel["link"])
示例#7
0
def drawYoutvgratis(url):
    channels = Youtvgratis.getChannels(url)
    logger.debug("items obtained: " + str(len(channels)))
    level = 119  # stream
    for channel in channels:
        img = ""
        if channel.has_key("thumbnail"):
            img = channel["thumbnail"]
        add_dir(channel["title"], channel["link"], level, img, "youtvgratis", channel["link"])
示例#8
0
def drawHdfullhdeu(page):
    jsonChannels = Hdfullhdeu.getChannels(page)
    mode = 4
    for item in jsonChannels:
        title = item["title"]
        link = item["link"]
        if item.has_key("permaLink"):
            mode = 2
        add_dir(title, link, mode, icon, "hdfullhdeu", link)
示例#9
0
def drawZonaAppCom():
    channels = ZonaAppCom.getChannelsJSON()
    logger.debug("items obtained: " + str(len(channels)))
    for channel in channels:
        image = ""
        level = 116
        if channel.has_key("thumbnail"):
            image = channel["thumbnail"]
        add_dir(channel["title"], channel["link"], level, image, "zonaappcom", channel["link"])
示例#10
0
def drawSports4u(page):
    jsonChannels = Sports4u.getChannels(page)
    for item in jsonChannels:
        title = item["title"]
        link = item["link"]
        mode = 106  # next step returns a final link
        if item.has_key("thumbnail"):
            image = item["thumbnail"]
        else:
            image = icon
        add_dir(title, link, mode, image, "sports4u", link)
示例#11
0
def drawLive9(page):
    jsonChannels = Live9net.getChannels(page)
    for item in jsonChannels:
        title = item["title"]
        link = item["link"]
        mode = 105  # next step returns a final link
        if item.has_key("thumbnail"):
            image = item["thumbnail"]
        else:
            image = icon
        add_dir(title, link, mode, image, "live9", link)
示例#12
0
def drawCinestrenostv(page):
    jsonChannels = Cineestrenostv.getChannels(page)
    for item in jsonChannels:
        title = item["title"]
        link = item["link"]
        mode = 102  # next step returns a final link
        if item.has_key("thumbnail"):
            image = item["thumbnail"]
        else:
            image = icon
        add_dir(title, link, mode, image, "cineestrenos", link)
示例#13
0
def drawRedeneobuxCom(url):
    channels = RedeneobuxCom.getChannels(url)
    logger.debug("items obtained: " + str(len(channels)))
    for channel in channels:
        level = 4
        if channel.has_key("finalLink"):
            level = 2  # m3u8 list
        img = ""
        if channel.has_key("thumbnail"):
            img = channel["thumbnail"]
        add_dir(channel["title"], channel["link"], level, img, "redeneobuxcom", channel["link"])
示例#14
0
def drawTuneIn(url):
    channels = TuneIn.getChannels(url)
    logger.debug("items obtained: " + str(len(channels)))
    for channel in channels:
        level = 4
        if channel.has_key("finalLink"):
            level = 118  # stream
        img = ""
        if channel.has_key("thumbnail"):
            img = channel["thumbnail"]
        add_dir(channel["title"], channel["link"], level, img, "tunein", channel["link"])
示例#15
0
def displayAntena3Teletext(url, page):
    logger.debug("displaying teletext for Antena3Text provider")
    imgPath = "http://www.antena3.com/teletexto/100/100_0001.png"  # first
    x = Antena3.getChannels(page)
    for element in x:
        if element.has_key("thumbnail"):  # displayed thumbnail
            imgPath = element["thumbnail"]
        else:  # continue
            add_dir(element["title"], element["link"], 4, element["link"], "teletext", element["link"])
            # finally show img (before render, xbmc will wait until some event happens)
    displayImg(imgPath)
示例#16
0
def drawYomviEs(page):
    mode = 120
    jsonChannels = Yomvies.getChannels(page)
    for item in jsonChannels:
        title = item["title"]
        link = item["link"]
        if item.has_key("thumbnail"):
            image = item["thumbnail"]
            logger.info("detected img: " + image)
        else:
            image = icon
        add_dir(title, link, mode, image, "yomvies", link)
示例#17
0
def drawHdfulltv(page):
    mode = 4  # continue browsing
    jsonChannels = HdfullTv.getChannels(page)
    for itemFirst in jsonChannels:
        if itemFirst.has_key("permalink"):
            if itemFirst.has_key("show"):  # serie
                link = (
                    "http://hdfull.tv/serie/"
                    + itemFirst["permalink"]
                    + "/temporada-"
                    + itemFirst["season"]
                    + "/episodio-"
                    + itemFirst["episode"]
                )
                title = itemFirst["show"]["title"]
                if type(title) == type(dict()):
                    if title.has_key("es"):
                        title = title["es"]
                    else:
                        title = ""
                    if len(title) == 0 and itemFirst["title"].has_key("en"):
                        title = itemFirst["title"]["en"]
                        # put the season and the chapter
                chapter = int(itemFirst["episode"])
                if chapter < 10:
                    chapterString = "0" + str(chapter)
                else:
                    chapterString = str(chapter)
                title = title + " " + itemFirst["season"] + "x" + chapterString
            else:
                if itemFirst["permalink"].find("http://") > -1:
                    link = itemFirst["permalink"]
                elif itemFirst["permalink"].find("http") > -1:
                    link = itemFirst["permalink"]
                else:
                    link = "http://hdfull.tv/" + itemFirst["permalink"]
                title = itemFirst["title"]
                if type(title) == type(dict()):
                    if title.has_key("es"):
                        title = title["es"]
                    else:
                        title = ""
                    if len(title) == 0 and itemFirst["title"].has_key("en"):
                        title = itemFirst["title"]["en"]
            if itemFirst.has_key("thumbnail"):
                image = itemFirst["thumbnail"]
                if image.find("http://") < 0:
                    image = "http://hdfull.tv/tthumb/130x190/" + image
            else:
                image = icon
        if itemFirst.has_key("finalLink"):
            mode = 100  # open link from provider
        add_dir(title, link, mode, image, "hdfulltv", link)
示例#18
0
def drawYoutube(url="0"):  # BROWSES ALL PROVIDERS (it has been re-sorted)
    # static content
    channels = Youtube.getChannels(url)
    logger.debug("items obtained: " + str(len(channels)))
    for channel in channels:
        image = ""
        level = 4
        if channel.has_key("finalLink"):
            level = 115
        if channel.has_key("thumbnail"):
            image = channel["thumbnail"]
        add_dir(channel["title"], channel["page"], level, image, "youtube", channel["page"])
示例#19
0
def drawReutersNews(url):  # from rss page
    x = Reuters.getChannels(url)
    if str(url) == "0":
        level = 4
        for new in x:
            img = ""
            if new.has_key("thumbnail"):
                img = new["thumbnail"]
            add_dir(new["title"], new["link"], level, img, "reuters", 1)
    else:
        body = x[0]["title"]
        drawNew(textContent=(body))
示例#20
0
def drawBruteChannels(html,icon=''):
	bruteChannels = html.split("#EXTINF")
	for item in bruteChannels:
		item = item[item.find(",") + 1:]
		name = item[:item.find("\n")]
		value = item[item.find("\n") + 1:]
		value = value[:value.find("\n")]
		# print "detected channel: "+name+" with url: "+value
		if name != "" and value != "":  ##check for empty channels, we don't want it in our list
			add_dir(name, value, 2, icon, '', name)
		else:
			logger.debug("Discarted brute: " + name + ", " + value)
示例#21
0
def drawRamalin(page):
    jsonChannels = Ramalin.getChannels(page)
    for item in jsonChannels:
        mode = 4
        title = item["title"]
        link = item["link"]
        if item.has_key("thumbnail"):
            image = item["thumbnail"]
            logger.info("detected img: " + image)
        else:
            image = icon
        if item.has_key("finalLink"):
            mode = 2
        add_dir(title, link, mode, image, "ramalin", link)
示例#22
0
def drawTvshowme(page):
    jsonChannels = Tvshowme.getChannels(page)
    for item in jsonChannels:
        mode = 4
        title = item["title"]
        link = item["link"]
        if item.has_key("thumbnail"):
            image = item["thumbnail"]
            logger.info("detected img: " + image)
        else:
            image = icon
        if item.has_key("finalLink"):
            mode = 100
        add_dir(title, link, mode, image, "tvshowme", link)
示例#23
0
def drawAcetvru(page):
    mode = 2
    jsonChannels = Acetvru.getChannels(page)
    for item in jsonChannels:
        title = item["title"]
        if title == "Display by event":
            title = XBMCUtils.getString(10006)
        link = item["link"]
        if item.has_key("thumbnail"):
            image = item["thumbnail"]
            logger.info("detected img: " + image)
        else:
            image = icon
        add_dir(title, link, mode, image, "acetvru", link)
示例#24
0
def drawMamahdcom(page):
    mode = 4
    jsonChannels = Mamahdcom.getChannels(page)
    for item in jsonChannels:
        title = item["title"]
        link = item["link"]
        if item.has_key("permaLink"):
            mode = 112
        if item.has_key("thumbnail"):
            image = item["thumbnail"]
            logger.info("detected img: " + image)
        else:
            image = icon
        add_dir(title, link, mode, image, "mamahdcom", link)
示例#25
0
def drawStreamgaroo(page):
    jsonChannels = Streamgaroo.getChannels(page)
    for item in jsonChannels:
        mode = 121
        title = item["title"]
        link = item["link"]
        if item.has_key("thumbnail"):
            image = item["thumbnail"]
            logger.info("detected img: " + image)
        else:
            image = icon
        if item.has_key("navigate"):
            mode = 4
        add_dir(title, link, mode, image, "streamgaroo", link)
示例#26
0
def drawSkylinewebcams(page):
    jsonChannels = Skylinewebcamscom.getChannels(page)
    mode = 4
    for item in jsonChannels:
        title = item["title"]
        link = item["link"]
        if item.has_key("thumbnail"):
            image = item["thumbnail"]
            logger.info("detected img: " + image)
        else:
            image = icon
        if item.has_key("permaLink"):
            mode = 108
        add_dir(title, link, mode, image, "skylinewebcams", link)
示例#27
0
def drawArenavisionin(page):
    mode = 4
    jsonChannels = Arenavisionin.getChannels(page)
    for item in jsonChannels:
        title = item["title"]
        if title == "Display by event":
            title = XBMCUtils.getString(10006)
        link = item["link"]
        if link != "1":
            mode = 114
        if item.has_key("thumbnail"):
            image = item["thumbnail"]
            logger.info("detected img: " + image)
        else:
            image = icon
        add_dir(title, link, mode, image, "arenavisionin", link)
示例#28
0
def drawShowsporttvcom(page):
    mode = 4
    jsonChannels = ShowsportTvCom.getChannels(page)
    for item in jsonChannels:
        title = item["title"]
        if title == "Display by event":
            title = XBMCUtils.getString(10006)
        link = item["link"]
        if link != "1":
            mode = 113
        if item.has_key("thumbnail"):
            image = item["thumbnail"]
            logger.info("detected img: " + image)
        else:
            image = icon
        add_dir(title, link, mode, image, "showsporttvcom", link)
示例#29
0
def drawZoptv(page):
    jsonChannels = Zoptvcom.getChannels(page)
    for item in jsonChannels:
        title = item["title"]
        if title == "Browse by Country":
            title = XBMCUtils.getString(10007)
        elif title == "Browse by Genre":
            title = XBMCUtils.getString(10008)
        link = item["link"]
        mode = 4
        if item.has_key("thumbnail"):
            image = item["thumbnail"]
            mode = 104
        else:
            image = icon
        add_dir(title, link, mode, image, "zoptv", link)
示例#30
0
def drawMobdro(page):
    jsonChannels = Mobdro.getChannels(page)
    for item in jsonChannels:
        title = item["title"]
        link = item["link"]
        if item.has_key("thumbnail"):
            image = item["thumbnail"]
            logger.info("detected img: " + image)
        else:
            image = icon
        if item.has_key("finalLink"):
            link = base64.encodestring(link)
            mode = 122  # base64 link, so needs to be decoded
        else:
            mode = 4
        add_dir(title, link, mode, image, "mobdro", link)