Ejemplo n.º 1
0
def PlayUrl(name, url, iconimage=None, info='', sub='', metah=''):
    if ";;;" in background:
        b = background.split(";;;")
        if "RC" in b[2]:
            AddFavorites(b[0], iconimage, b[1], "95", "historic.txt")
        elif "NC" in b[2]:
            AddFavorites(b[0], iconimage, b[1], "78", "historic.txt")
        elif "MM" in b[2]:
            AddFavorites(b[0], iconimage, b[1], "181", "historic.txt")
    url = re.sub('\.mp4$', '.mp4?play', url)
    url = common.getFinalUrl(url)
    #xbmc.log('--- Playing "{0}". {1}'.format(name, url), 2)
    listitem = xbmcgui.ListItem(path=url)
    if metah:
        listitem.setInfo(type="Video", infoLabels=metah)
    else:
        listitem.setInfo(type="Video",
                         infoLabels={
                             "mediatype": "video",
                             "Title": name,
                             "Plot": info
                         })
    if sub != '':
        listitem.setSubtitles(['special://temp/example.srt', sub])
    if iconimage is not None:
        try:
            listitem.setArt({'thumb': iconimage})
        except:
            listitem.setThumbnailImage(iconimage)
    xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, listitem)
def PlayUrl(name, url, iconimage=None):
	if url.startswith('acestream://'):
		url = 'plugin://program.plexus/?mode=1&url={0}&name={1}&iconimage={2}'.format(url, name, iconimage)
	else:
		url = common.getFinalUrl(url)
	xbmc.log('--- Playing "{0}". {1}'.format(name, url), 2)
	listitem = xbmcgui.ListItem(path=url)
	listitem.setInfo(type="Video", infoLabels={"mediatype": "movie", "Title": name })
	if iconimage is not None:
		try:
			listitem.setArt({'thumb' : iconimage})
		except:
			listitem.setThumbnailImage(iconimage)
	xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, listitem)
Ejemplo n.º 3
0
def PlayUrl(name, url, iconimage=None, info='', sub='', metah=''):
	#url = re.sub('\.mp4$', '.mp4?play', url)
	url = common.getFinalUrl(url)
	#xbmc.log('--- Playing "{0}". {1}'.format(name, url), 2)
	listitem = xbmcgui.ListItem(path=url)
	if metah:
		listitem.setInfo(type="Video", infoLabels=metah)
	else:
		listitem.setInfo(type="Video", infoLabels={"mediatype": "video", "Title": name, "Plot": info })
	if sub!='':
		listitem.setSubtitles(['special://temp/example.srt', sub ])
	if iconimage is not None:
		try:
			listitem.setArt({'thumb' : iconimage})
		except:
			listitem.setThumbnailImage(iconimage)
	xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, listitem)
Ejemplo n.º 4
0
def PlayUrl(name, url, iconimage=None, info=''):
    #xbmcgui.Dialog().ok(background, url + " " +background)
    if background != "None":
        b = background.split(";;;")
        if "redecanais" in background:
            AddFavorites(b[0], iconimage, b[1], "95", "historic.txt")
        else:
            AddFavorites(b[0], iconimage, b[1], "79", "historic.txt")
    url = common.getFinalUrl(url)
    xbmc.log('--- Playing "{0}". {1}'.format(name, url), 2)
    listitem = xbmcgui.ListItem(path=url)
    listitem.setInfo(type="Video",
                     infoLabels={
                         "mediatype": "video",
                         "Title": name,
                         "Plot": info
                     })
    if iconimage is not None:
        try:
            listitem.setArt({'thumb': iconimage})
        except:
            listitem.setThumbnailImage(iconimage)
    xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, listitem)