Ejemplo n.º 1
0
        def run(self):

            window1.Ui_window1.hasclicked = True
            print config.Username + '2'
            ui.label.setText('Fetching...')
            ui.label.show()
            youtube.getid(config.Username)

            print 'showing'
            if youtube.haveconnection:

                youtube.getuploads()
                if not youtube.data:
                    print 'no data'
                    ui.label.setText('No Uploads')
                try:
                    if youtube.completedRetrieve:
                        print 'cash'
                        ui.label.hide()
                        showTitles()
                        cashData()
                    else:
                        ui.label.setText('Failed')
                except (AttributeError):
                    pass
            else:
                ui.label.setText('no connection')
                ui.label.show()

            window1.Ui_window1.hasclicked = False
            return
def novedades(params,url,category):
	xbmc.output("[euronews.py] novedades")

	# Parametros
	channelname = url
	startindex = int(params.get("startindex"))
	maxresults = int(params.get("maxresults"))

	# Videos
	itemlist = youtube.getuploads(channelname,startindex,maxresults)
	for item in itemlist:
		xbmctools.addnewvideo( CHANNELCODE , "play" , category , "Directo" , item.title , item.url , item.thumbnail , item.plot )

	# Paginacion
	if len(itemlist)>=13:
		addnewfolder( CHANNELCODE , "novedades" , CHANNELNAME , "!Siguiente pagina" , channelname , "" , "" , startindex+maxresults, maxresults )		

	# Cierra el directorio
	xbmcplugin.setPluginCategory( handle=pluginhandle, category=category )
	xbmcplugin.addSortMethod( handle=pluginhandle, sortMethod=xbmcplugin.SORT_METHOD_NONE )
	xbmcplugin.endOfDirectory( handle=pluginhandle, succeeded=True )
def novedades(params,url,category):
	xbmc.output("[earthtv.py] novedades")
	itemlist = youtube.getuploads("earthTV",1,10)
	videos(params,url,category,itemlist)