Esempio n. 1
0
def index():
	live_streaming = getNextRace()

	tools.addLink(live_streaming, 'http://aos001feh-live.hls.adaptive.level3.net/formulae/live/wif/wif.m3u8', 'play', 'http://osp001feh-vod.hls.adaptive.level3.net/web/liveplayer/image.png')
	tools.addDir('[COLOR orange]'+translation(30001)+'[/COLOR]', 'http://www.fiaformulae.com/en/video.aspx', 'videos', '')
	tools.addDir('[COLOR orange]'+translation(30002)+'[/COLOR]', 'http://www.fiaformulae.com/en/video/archive/highlights.aspx', 'videos', '')
	tools.addDir('[COLOR blue]'+translation(30003)+'[/COLOR]', 'http://www.fiaformulae.com/en/live-streaming.aspx', 'extendedhighlights', '')
	tools.addDir(translation(30004), 'http://www.fiaformulae.com/en/video/archive/formula-e-onboard-videos.aspx', 'videos', '')
	tools.addDir(translation(30005), 'http://www.fiaformulae.com/en/video/archive/pre-season-testing.aspx', 'videos', '')
	tools.addDir(translation(30006), 'http://www.fiaformulae.com/en/video/archive/street-demos.aspx', 'videos', '')
	tools.addDir(translation(30007), 'http://www.fiaformulae.com/en/video/archive/insight.aspx', 'videos', '')
	xbmcplugin.endOfDirectory(pluginhandle)
Esempio n. 2
0
def listVideos(url, pattern):
	data = tools.getUrl(url)

	matches = re.compile(pattern, re.DOTALL).findall(data)

	for match in matches:
		tools.log("listVideos->match: "+str(match))
		
	for scrapedurl, scrapedthumbnail, scrapedtitle, scrapeddate in matches:
		scrapedtitle = tools.cleanText(scrapedtitle)
		scrapeddate = scrapeddate.replace('<span class="dateseparator">|</span>\r\n                            ', ' | ').strip()
		tools.addLink(scrapedtitle+" ["+scrapeddate+"]", scrapedurl, 'playVideo', scrapedthumbnail)

	xbmcplugin.endOfDirectory(pluginhandle)
	
	if forceViewMode:
		tools.set_view(viewMode)