Beispiel #1
0
def play(item):
    logger.info("[earthtv.py] play")

    itemlist = []

    # Extrae el ID
    id = youtube.Extract_id(item.url)
    logger.info("[earthtv.py] id=" + id)

    # Descarga la página
    data = scrapertools.cache_page(item.url)

    # Obtiene la URL
    url = youtube.geturls(id, data)

    itemlist.append(
        Item(channel=CHANNELNAME,
             title=item.title,
             action="play",
             server="Directo",
             url=url,
             thumbnail=item.thumbnail,
             folder=False))

    return itemlist
Beispiel #2
0
def play(item):
    logger.info("[earthtv.py] play")

    itemlist = []

    # Extrae el ID
    id = youtube.Extract_id(item.url)
    logger.info("[earthtv.py] id="+id)
    
    # Descarga la página
    data = scrapertools.cache_page(item.url)
    
    # Obtiene la URL
    url = youtube.geturls(id,data)

    itemlist.append( Item(channel=CHANNELNAME, title=item.title , action="play" , server="Directo", url=url, thumbnail=item.thumbnail , folder=False) )

    return itemlist
def play(params,url,category):
	xbmc.output("[earthtv.py] play")

	# Extrae el ID
	id = youtube.Extract_id(url)
	xbmc.output("[earthtv.py] id="+id)
	
	# Descarga la página
	data = scrapertools.cachePage(url)
	
	# Obtiene la URL
	url = youtube.geturls(id,data)
	print url
	
	title = unicode( xbmc.getInfoLabel( "ListItem.Title" ), "utf-8" )
	thumbnail = urllib.unquote_plus( params.get("thumbnail") )
	plot = unicode( xbmc.getInfoLabel( "ListItem.Plot" ), "utf-8" )
	server = "Directo"

	xbmctools.playvideo(CHANNELNAME,server,url,category,title,thumbnail,plot)
def play(params, url, category):
    xbmc.output("[earthtv.py] play")

    # Extrae el ID
    id = youtube.Extract_id(url)
    xbmc.output("[earthtv.py] id=" + id)

    # Descarga la página
    data = scrapertools.cachePage(url)

    # Obtiene la URL
    url = youtube.geturls(id, data)
    print url

    title = unicode(xbmc.getInfoLabel("ListItem.Title"), "utf-8")
    thumbnail = urllib.unquote_plus(params.get("thumbnail"))
    plot = unicode(xbmc.getInfoLabel("ListItem.Plot"), "utf-8")
    server = "Directo"

    xbmctools.playvideo(CHANNELNAME, server, url, category, title, thumbnail,
                        plot)