Beispiel #1
0
def INDEX(params):
	path = params.get("path", None)
	
	scraper = resources.scraper.MenuItems()
	if path is None:
	
		#addDir({
		#	"path"	: "",
		#	"name"	: "Live Stream",
		#	"url"	: "rtmp://cp87869.live.edgefcs.net:1935/live app=ondemand?_fcs_vhost=cp115717.edgefcs.net playpath=us_300@21006 pageURL=http://www.bloomberg.com/tv/  swfUrl=http://player.ooyala.com/static/cacheable/1c3d7af1e06c53793eb20187993e2276/player_v2.swf/[[DYNAMIC]]/1  swfVfy=true live=true",
		#	"mode"	: "2"
		#}, False)
		addDir({"path" : "http://www.bloomberg.com/tv/", "name" : "Live Stream", "url" : "http://www.bloomberg.com/tv/", "mode" : "2"} , False)

		
		for title, id, desc, img in scraper.menu_main(path):
			addDir({"path" : id, "name" : title, "url" : id, "mode" : "0"}, True, {"plot": desc}, img)
	else:
		shows,pagination = scraper.menu_shows(path)
		for (title, id) in pagination:
			addDir({"path" : id, "name" : title, "url" : id, "mode" : "0"}, True, {})
		 
		for (title, id, desc, img,dur) in shows:
			addDir({"path" : id, "name" : title, "url" : id, "mode" : "1"}, False, {"plot": desc, "duration":dur }, img)
	xbmcplugin.addSortMethod( handle=int( sys.argv[ 1 ] ), sortMethod=xbmcplugin.SORT_METHOD_UNSORTED )
	xbmcplugin.addSortMethod( handle=int( sys.argv[ 1 ] ), sortMethod=xbmcplugin.SORT_METHOD_LABEL )		
	xbmcplugin.endOfDirectory(int(sys.argv[1]))
Beispiel #2
0
def ITEMS(params):
    path = params.get("path", None)
    mode = "2"
    scraper = resources.scraper.MenuItems()
    nodes = scraper.menu_shows(path)

    for node in sorted(nodes):
        addDir(
            {"path": node["url"], "name": node["title"], "url": node["url"], "mode": "2"},
            False,
            info=node["info"],
            still=node["thumbnail"],
        )
    xbmcplugin.endOfDirectory(int(sys.argv[1]))
Beispiel #3
0
def ITEMS(params):
	path = params.get("path", None)
	mode = "2"
	scraper = resources.scraper.MenuItems()
	pp =  scraper.menu_shows(path)
	for date,title,url,txt,img  in sorted(pp):
		#print date,title,url,txt
		addDir({"path" : url, "name" : title, "url" : url, "mode" : "2"}, False, info = {"date" : date, "plot" : txt}, still = img)

	xbmcplugin.addSortMethod( handle=int( sys.argv[ 1 ] ), sortMethod=xbmcplugin.SORT_METHOD_UNSORTED )
	xbmcplugin.addSortMethod( handle=int( sys.argv[ 1 ] ), sortMethod=xbmcplugin.SORT_METHOD_LABEL )
	xbmcplugin.addSortMethod( handle=int( sys.argv[ 1 ] ), sortMethod=xbmcplugin.SORT_METHOD_VIDEO_RATING )
	xbmcplugin.addSortMethod( handle=int( sys.argv[ 1 ] ), sortMethod=xbmcplugin.SORT_METHOD_DATE )
	xbmcplugin.addSortMethod( handle=int( sys.argv[ 1 ] ), sortMethod=xbmcplugin.SORT_METHOD_PROGRAM_COUNT )
	xbmcplugin.addSortMethod( handle=int( sys.argv[ 1 ] ), sortMethod=xbmcplugin.SORT_METHOD_VIDEO_RUNTIME )
	xbmcplugin.addSortMethod( handle=int( sys.argv[ 1 ] ), sortMethod=xbmcplugin.SORT_METHOD_GENRE )	   
	xbmcplugin.endOfDirectory(int(sys.argv[1]))