Exemple #1
0
def get_trakt_ids(*args, **kwargs):
    try:
        from trakt import trakt

        return trakt.find_trakt_ids(*args, **kwargs)
    except:
        return None
Exemple #2
0
def people_list_movie_people(id, source, fanart):
    items = []
    try:
        if source == "imdb":
            people = trakt.get_movie_people(id)
        elif source == "tmdb":
            ids = trakt.find_trakt_ids("tmdb", id)
            if ids:
                people = trakt.get_movie_people(ids["imdb"])
            else:
                xbmcgui.Dialog().ok("Error", "No cast info found")
                return plugin.finish(items=[])
        else:
            xbmcgui.Dialog().ok("Error", "No cast info found")
            return plugin.finish(items=[])
    except:
        xbmcgui.Dialog().ok("Error", "No cast info found")
        return plugin.finish(items=[])
    if "cast" in people:
        for actor in people["cast"]:
            context_menu = [("Convert to bob_xml", "RunPlugin({0})".format(
                plugin.url_for("bob_convert_person_to_xml",
                               trakt_id=actor["person"]["ids"]["trakt"])))]
            image = get_person_artwork(actor)
            label = "{0} ({1})".format(to_utf8(actor["person"]["name"]),
                                       to_utf8(actor["character"]))
            info = actor["person"]["biography"]
            items.append({
                'label':
                label,
                'path':
                plugin.url_for("people_list_person_select",
                               id=actor["person"]["ids"]["trakt"],
                               name=to_utf8(actor["person"]["name"])),
                'info':
                info,
                'thumbnail':
                image,
                'poster':
                image,
                'context_menu':
                context_menu,
                'icon':
                "DefaultVideo.png",
                'properties': {
                    'fanart_image': fanart
                },
            })
        return plugin.finish(items=items)
    else:
        xbmcgui.Dialog().ok("Error", "No cast info found")
Exemple #3
0
def people_list_movie_people(id, source, fanart):
    items = []
    try:
        if source == "imdb":
            people = trakt.get_movie_people(id)
        elif source == "tmdb":
            ids = trakt.find_trakt_ids("tmdb", id)
            if ids:
                people = trakt.get_movie_people(ids["imdb"])
            else:
                xbmcgui.Dialog().ok("Error", "No cast info found")
                return plugin.finish(items=[])
        else:
            xbmcgui.Dialog().ok("Error", "No cast info found")
            return plugin.finish(items=[])
    except:
        xbmcgui.Dialog().ok("Error", "No cast info found")
        return plugin.finish(items=[])
    if "cast" in people:
        for actor in people["cast"]:
            context_menu = [
                (
                    "Convert to bob_xml",
                    "RunPlugin({0})".format(
                        plugin.url_for("bob_convert_person_to_xml", trakt_id=actor["person"]["ids"]["trakt"]))
                )
            ]
            image = get_person_artwork(actor)
            label = "{0} ({1})".format(to_utf8(actor["person"]["name"]), to_utf8(actor["character"]))
            info = actor["person"]["biography"]
            items.append({'label': label,
                          'path': plugin.url_for("people_list_person_select", id=actor["person"]["ids"]["trakt"],
                                                 name=to_utf8(actor["person"]["name"])),
                          'info': info,
                          'thumbnail': image,
                          'poster': image,
                          'context_menu': context_menu,
                          'icon': "DefaultVideo.png",
                          'properties': {'fanart_image': fanart},
                          })
        return plugin.finish(items=items)
    else:
        xbmcgui.Dialog().ok("Error", "No cast info found")
Exemple #4
0
def get_trakt_ids(*args, **kwargs):
    try:
        from trakt import trakt
        return trakt.find_trakt_ids(*args, **kwargs)
    except:
        return None
Exemple #5
0
def get_trakt_ids(*args, **kwargs):
    from trakt import trakt
    return trakt.find_trakt_ids(*args, **kwargs)
Exemple #6
0
def get_trakt_ids(*args, **kwargs):
    from trakt import trakt
    return trakt.find_trakt_ids(*args, **kwargs)