Esempio n. 1
0
def phoenix_Live(href, title, Plot):
    PLog('phoenix_Live:')

    li = xbmcgui.ListItem()
    li = home(li, ID='phoenix')  # Home-Button

    img = ICON_TVLIVE
    if SETTINGS.getSetting(
            'pref_video_direct') == 'true':  # or Merk == 'true'	# Sofortstart
        PLog('Sofortstart: phoenix_Live')
        PlayVideo(url=href, title=title, thumb=img, Plot=Plot)
        return

    Plot_par = Plot.replace('\n', '||')
    title = py2_encode(title)
    href = py2_encode(href)
    img = py2_encode(img)
    Plot_par = py2_encode(Plot_par)
    label = title.replace('Live', 'auto')
    fparams="&fparams={'url': '%s', 'title': '%s', 'thumb': '%s', 'Plot': '%s', 'sub_path': '', 'Merk': 'false'}" %\
     (quote_plus(href), quote_plus(title), quote_plus(img), quote_plus(Plot_par))
    addDir(li=li,
           label=label,
           action="dirList",
           dirID="PlayVideo",
           fanart=img,
           thumb=img,
           fparams=fparams,
           mediatype='video',
           tagline=Plot)

    li = ardundzdf.Parseplaylist(li, href, img, geoblock='', descr=Plot)

    xbmcplugin.endOfDirectory(HANDLE, cacheToDisc=True)
Esempio n. 2
0
def Live(name, epg='', Merk='false'):	
	PLog('Live: ' + name)
	title2 = name
	epg = UtfToStr(epg)
	
	li = xbmcgui.ListItem()
	li = home(li, ID='3Sat')						# Home-Button
	
	url = 'http://zdf0910-lh.akamaihd.net/i/dach10_v1@392872/master.m3u8'
	# epg_url = 'https://programm.ard.de/TV/ARD-Mediathek/Programmkalender/?sender=28007'	# entf. 
	epgname = 'ARD'; listname = '3sat'
	summary = 'automatische Auflösung';				
	title = 'Bandbreite und Auflösung automatisch'
	img	= R(ICON_TV3Sat)
	
	if not epg:
		epg = get_epg()
	summ = epg

	if SETTINGS.getSetting('pref_video_direct') == 'true' or Merk == 'true':	# Sofortstart
		if SETTINGS.getSetting('pref_show_resolution') == 'false' or Merk == 'true':
			PLog('Sofortstart: SenderLiveResolution')
			PlayVideo(url=url, title='3Sat Live TV', thumb=img, Plot=summ, Merk=Merk)
			return	
							
	fparams="&fparams={'url': '%s', 'title': '%s', 'thumb': '%s', 'Plot': '%s', 'sub_path': '', 'Merk': 'false'}" %\
		(urllib.quote_plus(url), urllib.quote_plus(title), urllib.quote_plus(img), 
		urllib.quote_plus(summ))
	addDir(li=li, label=title, action="dirList", dirID="PlayVideo", fanart=img, thumb=img, fparams=fparams, 
		mediatype='video', tagline=epg) 		
	
	li =  ardundzdf.Parseplaylist(li, url, img, geoblock='', tagline=epg, descr=summ)	
	
	xbmcplugin.endOfDirectory(HANDLE)
Esempio n. 3
0
def ARDStartVideoStreams(title, path, summ, tagline, img, geoblock, sub_path='', Merk='false'): 
	PLog('ARDStartVideoStreams:'); 
	
	title_org = title	
	geoblock = UtfToStr(geoblock)
	li = xbmcgui.ListItem()
	li = home(li, ID='ARD Neu')								# Home-Button
	
	page, msg = get_page(path)					
	if page == '':	
		msg1 = "Fehler in ARDStartVideoStreams: %s"	% title
		msg2 = msg
		xbmcgui.Dialog().ok(ADDON_NAME, msg1, msg2, '')	
		return li
	PLog(len(page))
	
	Plugins = blockextract('_plugin', page)	# wir verwenden nur Plugin1 (s.o.)
	Plugin1	= Plugins[0]							
	VideoUrls = blockextract('_quality', Plugin1)
	PLog(len(VideoUrls))
	
	href = ''
	for video in  VideoUrls:
		# PLog(video)
		q = stringextract('_quality":"', '"', video)	# Qualität (Bez. wie Original)
		if q == 'auto':
			href = stringextract('json":["', '"', video)	# Video-Url
			quality = 'Qualität: automatische'
			PLog(quality); PLog(href)	 
			break

	if 'master.m3u8' in href == False:						# möglich: ../master.m3u8?__b__=200
		msg = 'keine Streamingquelle gefunden - Abbruch' 
		PLog(msg)
		msg1 = "keine Streamingquelle gefunden: %s"	% title
		xbmcgui.Dialog().ok(ADDON_NAME, msg1, '', '')	
		return li
	if href.startswith('http') == False:
		href = 'http:' + href
	href = href.replace('https', 'http')					# Plex: https: crossdomain access denied
		
	lable = 'Bandbreite und Auflösung automatisch ' 		# master.m3u8
	lable = lable + geoblock
	title 	= UtfToStr(title)
	title_org 	= UtfToStr(title_org)
	href 		= UtfToStr(href)
	img 	= UtfToStr(img)
	lable 	= UtfToStr(lable)
	summ	= UtfToStr(summ)
	tagline	= UtfToStr(tagline)
	
	Plot = "%s||||%s" % (tagline, summ)					# || Code für LF (\n scheitert in router)
	if SETTINGS.getSetting('pref_video_direct') == 'true' or Merk == 'true':	# Sofortstart
		if SETTINGS.getSetting('pref_show_resolution') == 'false' or Merk == 'true':
			PLog('Sofortstart: ARDStartVideoStreams')
			PlayVideo(url=href, title=title, thumb=img, Plot=Plot, sub_path=sub_path, Merk=Merk)
			return
		
	title=repl_json_chars(title); title_org=repl_json_chars(title_org); lable=repl_json_chars(lable); 
	summ=repl_json_chars(summ); tagline=repl_json_chars(tagline); 
	fparams="&fparams={'url': '%s', 'title': '%s', 'thumb': '%s', 'Plot': '%s', 'sub_path': '%s', 'Merk': '%s'}" %\
		(urllib.quote_plus(href), urllib.quote_plus(title_org), urllib.quote_plus(img), urllib.quote_plus(Plot), 
		urllib.quote_plus(sub_path), Merk)
	addDir(li=li, label=lable, action="dirList", dirID="PlayVideo", fanart=img, thumb=img, fparams=fparams, 
		mediatype='video', tagline=tagline, summary=summ) 
	
	li = ardundzdf.Parseplaylist(li, href, img, geoblock, tagline=tagline, descr=summ, sub_path=sub_path)	# einzelne Auflösungen 		
			
	xbmcplugin.endOfDirectory(HANDLE)