예제 #1
0
def play_acelive(link, imagen=""):
    from AceStream import TSengine as tsengine
    videos = {}
    if imagen == "":
        imagen = os.path.join(__cwd__, "resources", "images",
                              "acestreamlogo.png")
    TSplayer = tsengine()
    carga = TSplayer.load_torrent(link.replace("acestream://", ""),
                                  'PID',
                                  port=int(__addon__.getSetting('portace')))
    if carga == 'Ok':
        for k, v in TSplayer.files.iteritems():
            titulo = urllib.unquote(k)
            videos[titulo] = v
    if len(videos.keys()) == 1:
        savelink(link, titulo)
        TSplayer.play_url_ind(videos.get(titulo), titulo, None, imagen)
    elif len(videos.keys()) >= 2:
        seleccion = xbmcgui.Dialog().select("Seleccionar stream",
                                            videos.keys())
        if seleccion != -1:
            TSplayer.play_url_ind(videos.get(videos.keys()[seleccion]),
                                  videos.keys()[seleccion], None, imagen)
        else:
            show_Msg('Reproductor AceStream', 'Ningun stream elegido', 3000)
    else:
        ok = xbmcgui.Dialog().ok("Reproductor AceStream",
                                 "AceStream no ha podido cargar el stream")
    TSplayer.end()
예제 #2
0
def play_torrent_from_file(fichero, imagen = ""):
	try:
		f = open(fichero, 'rb')
		data=f.read()
		f.close
	except:
		xbmcgui.Dialog().ok("Reproductor AceStream" , "No se ha podido cargar el fichero torrent")
		return
	check = acewarn(data)
	if not check:
		sel = xbmcgui.Dialog().yesno("Reproductor AceStream" , "AceStream tiene un error interno y no reproduce","correctamente videos de mas de 2Gb. contenidos","en archivos torrent multifichero.  Reproducir?")
		if not sel: return
	from AceStream import TSengine as tsengine
	videos = {}
	if imagen == "": imagen = os.path.join( __cwd__ ,"resources","images","acestreamlogo.png")
	TSplayer=tsengine()
	carga=TSplayer.load_torrent(base64.b64encode(data),'RAW',port=int(__addon__.getSetting('portace')))
	if carga=='Ok':
		for k,v in TSplayer.files.iteritems():
			titulo = urllib.unquote(k)
			videos[titulo] = v
	if len(videos.keys()) == 1:
		TSplayer.play_url_ind(videos.get(titulo), titulo, None, imagen)
	elif len(videos.keys()) >= 2:
		seleccion = xbmcgui.Dialog().select("Seleccionar Video", videos.keys())
		if seleccion != -1: TSplayer.play_url_ind( videos.get(videos.keys()[seleccion]) , videos.keys()[seleccion] , None, imagen)
		else: show_Msg('Reproductor AceStream', 'Ningun video elegido', 3000)    
	else: ok = xbmcgui.Dialog().ok("Reproductor AceStream" , "AceStream no ha podido cargar la lista de ficheros del torrent.")
	TSplayer.end()
예제 #3
0
def play_torrent_from_file(fichero, imagen=""):
    try:
        f = open(fichero, 'rb')
        data = f.read()
        f.close
    except:
        xbmcgui.Dialog().ok("Reproductor AceStream",
                            "No se ha podido cargar el fichero torrent")
        return
    check = acewarn(data)
    if not check:
        sel = xbmcgui.Dialog().yesno(
            "Reproductor AceStream",
            "AceStream tiene un error interno y no reproduce",
            "correctamente videos de mas de 2Gb. contenidos",
            "en archivos torrent multifichero.  Reproducir?")
        if not sel: return
    from AceStream import TSengine as tsengine
    videos = {}
    if imagen == "":
        imagen = os.path.join(__cwd__, "resources", "images",
                              "acestreamlogo.png")
    TSplayer = tsengine()
    carga = TSplayer.load_torrent(base64.b64encode(data),
                                  'RAW',
                                  port=int(__addon__.getSetting('portace')))
    if carga == 'Ok':
        for k, v in TSplayer.files.iteritems():
            titulo = urllib.unquote(k)
            videos[titulo] = v
    if len(videos.keys()) == 1:
        TSplayer.play_url_ind(videos.get(titulo), titulo, None, imagen)
    elif len(videos.keys()) >= 2:
        seleccion = xbmcgui.Dialog().select("Seleccionar Video", videos.keys())
        if seleccion != -1:
            TSplayer.play_url_ind(videos.get(videos.keys()[seleccion]),
                                  videos.keys()[seleccion], None, imagen)
        else:
            show_Msg('Reproductor AceStream', 'Ningun video elegido', 3000)
    else:
        ok = xbmcgui.Dialog().ok(
            "Reproductor AceStream",
            "AceStream no ha podido cargar la lista de ficheros del torrent.")
    TSplayer.end()
예제 #4
0
def play_acelive(link,imagen=""):
	from AceStream import TSengine as tsengine
	videos = {}
	if imagen == "": imagen = os.path.join( __cwd__ ,"resources","images","acestreamlogo.png")
	TSplayer=tsengine()
	carga=TSplayer.load_torrent(link.replace("acestream://",""),'PID',port=int(__addon__.getSetting('portace')))
	if carga=='Ok':
		for k,v in TSplayer.files.iteritems():
			titulo = urllib.unquote(k)
			videos[titulo] = v
	if len(videos.keys()) == 1:
		savelink(link,titulo)
		TSplayer.play_url_ind(videos.get(titulo), titulo, None, imagen)
	elif len(videos.keys()) >= 2:
		seleccion = xbmcgui.Dialog().select("Seleccionar stream", videos.keys())
		if seleccion != -1: TSplayer.play_url_ind( videos.get(videos.keys()[seleccion]) , videos.keys()[seleccion] , None, imagen)
		else: show_Msg('Reproductor AceStream', 'Ningun stream elegido', 3000)    
	else: ok = xbmcgui.Dialog().ok("Reproductor AceStream" , "AceStream no ha podido cargar el stream")
	TSplayer.end()