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]))
def INDEX(params): scraper = resources.scraper.MenuItems() addDir({"path" : "Live Stream RT-1", "name" : "Live Stream RT-1", "url" : 'rtmp://fms5.visionip.tv/live app=live playpath=RT_1 live=true', "mode" : "3"}, False) for title, url, desc,still in scraper.menu_main(): #print title, url, desc,still addDir({"path" : url, "name" : title, "url" : url, "mode" : "1"}, True, {"plot": desc}, still = still) 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]))
def INDEX(params): path = params.get("path", None) scraper = resources.scraper.MenuItems() if path is None: for title, id, desc in sorted(scraper.menu_main(path)): addDir({"path": id, "name": title, "url": id, "mode": "0"}, True, {"plot": desc}) else: for title, url in sorted(scraper.menu_sub(path)): addDir({"path": url, "name": title, "url": url, "mode": "1"}, True) xbmcplugin.endOfDirectory(int(sys.argv[1]))