示例#1
0
def item(params):
    info = scrapper.get_info(params["item"])
    xbmc_info = scrapper.xbmc_info(info)
    page = util.request(info["trailers_url"], headers={"Referer": BASE_URL})
    data = util.substr(page, '<label for="frmfilterSelectForm-filter">', "</select>")
    xbmcutil.add_dir(
        __language__(30007), params, info["img"], infoLabels=xbmc_info, menuItems={__language__(30007): "Action(info)"}
    )
    add_addon_search(30006, "plugin.video.online-files", info, "search")
    def_trailer = None
    for m in re.finditer('<option value="(?P<url>[^"]+)[^>]+>(?P<name>[^<]+)', data, re.DOTALL | re.IGNORECASE):
        url = info["url"] + "/videa/-filtr-" + m.group("url")
        trailer = util._create_plugin_url({"play": url})
        if def_trailer == None:
            info["trailer"] = trailer
            scrapper.set_info(info)
        xbmc_info["Title"] = "%s - %s" % (info["title"], m.group("name"))
        xbmcutil.add_video(
            m.group("name"),
            {"play": url},
            info["img"],
            infoLabels=xbmc_info,
            menuItems={__language__(30007): "Action(info)"},
        )
    xbmcplugin.endOfDirectory(int(sys.argv[1]))
示例#2
0
def add_item(name, info, showing=None):
    xbmc_info = scrapper.xbmc_info(info)
    if not "0%" == info["percent"]:
        name += " " + info["percent"]
    menuItems = {__language__(30007): "Action(info)", __language__(30001): {"preload-refresh": ""}}
    if showing:
        menuItems[__language__(30025)] = {"show-cinema": showing}
    xbmcutil.add_dir(name, {"item": furl(info["url"])}, info["img"], infoLabels=xbmc_info, menuItems=menuItems)
示例#3
0
def person(params):
    info = scrapper.get_info(params["person"])
    xbmc_info = scrapper.xbmc_info(info)
    page = util.request(info["url"], headers={"Referer": BASE_URL})
    data = util.substr(page, '<div id="filmography"', '<div id="fanclub"')
    results = []
    for m in re.finditer("<td(?P<item>.+?)</td>", data, re.DOTALL | re.IGNORECASE):
        base = re.search('<a href="(?P<url>[^"]+)[^>]+>(?P<name>[^<]+)', m.group("item"))
        if base:
            name = base.group("name")
            for n in re.finditer("<span[^>]*>(?P<data>[^<]+)", m.group("item")):
                name = "%s %s" % (name, n.group("data"))
            results.append((base.group("url"), name))
    if preload():
        return preload_items(results)
    add_items(results)
    xbmcplugin.endOfDirectory(int(sys.argv[1]))
示例#4
0
def add_person(name, info):
    xbmc_info = scrapper.xbmc_info(info)
    xbmcutil.add_dir(name, {"person": furl(info["url"])}, "DefaultArtist.png", infoLabels=xbmc_info)