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
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)
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)
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)
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)
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"])
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"])
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)
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"])
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)
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)
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)
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"])
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"])
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)
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)
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)
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"])
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))
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)