def record(params): scraper = resources.scraper.MenuItems() print scraper.menu_play(params["url"]) rtmp, app, playpath = scraper.menu_play(params["url"])[1] args = __settings__.getSetting( "rtmpdump" ), "-o%s%s.mp4" % (__settings__.getSetting( "path" ), "".join(c for c in params["name"].split("/")[-1] if c not in "?:/\\*@#$!~^" )), "--rtmp=%s" % rtmp, "--playpath=%s" % playpath print args subprocess.call(args)
def play(params): scraper = resources.scraper.MenuItems() xbmc.Player(xbmc.PLAYER_CORE_DVDPLAYER).play(scraper.menu_play(params["url"])[0], xbmcgui.ListItem(params["name"]))
def play(params): scraper = resources.scraper.MenuItems() addon = xbmcaddon.Addon(id=os.path.basename(os.getcwd())) bitrate = addon.getSetting("vid_quality") xbmc.Player(xbmc.PLAYER_CORE_DVDPLAYER).play(scraper.menu_play(params["url"]), xbmcgui.ListItem(params["name"]))