Ejemplo n.º 1
0
def trakt_movies_recommendations(raw=False):
    from trakt import trakt
    genres_dict = dict([(x['slug'], x['name'])
                        for x in trakt.trakt_get_genres("movies")])
    result = trakt.get_recommendations("movies")
    if raw: return result
    else: return list_trakt_movies_basic(result)
Ejemplo n.º 2
0
def movies_trakt_recommendations():
    from trakt import trakt
    genres_dict = dict([(x['slug'], x['name']) for x in trakt.trakt_get_genres("movies")])
    movies = trakt.get_recommendations("movies")
    items = []
    for movie in movies:
        items.append(make_movie_item(get_trakt_movie_metadata(movie, genres_dict)))
    return items
Ejemplo n.º 3
0
def tv_trakt_recommendations():
    from trakt import trakt
    genres_dict = trakt.trakt_get_genres("tv")
    shows = trakt.get_recommendations("shows")
    items = []
    for show in shows:
        items.append(make_tvshow_item(get_tvshow_metadata_trakt(show, genres_dict)))
    return items
Ejemplo n.º 4
0
def tv_trakt_recommendations():
    from trakt import trakt
    genres_dict = trakt.trakt_get_genres("tv")
    shows = trakt.get_recommendations("shows")
    items = []
    for show in shows:
        items.append(make_tvshow_item(get_tvshow_metadata_trakt(show, genres_dict)))
    return items
Ejemplo n.º 5
0
def movies_trakt_recommendations():
    from trakt import trakt
    genres_dict = dict([(x['slug'], x['name']) for x in trakt.trakt_get_genres("movies")])
    movies = trakt.get_recommendations("movies")
    items = []
    for movie in movies:
        items.append(make_movie_item(get_trakt_movie_metadata(movie, genres_dict)))
    if FORCE == True: return plugin.finish(items=items, sort_methods=SORT, view_mode=VIEW)
    else: return plugin.finish(items=items, sort_methods=SORT)
Ejemplo n.º 6
0
def trakt_movies_recommendations_to_library():
    from trakt import trakt
    if dialogs.yesno(
            _("Scan item to library"), "{0}[CR]{1}".format(
                _("Add %s") %
                ("'{0} {1} {2}'".format("Trakt", _("movie"),
                                        _("Recommendations").lower())),
                _("Are you sure?"))):
        movies_add_all_to_library(trakt.get_recommendations("movies"))
Ejemplo n.º 7
0
def trakt_tv_recommendations():
    from trakt import trakt
    genres_dict = trakt.trakt_get_genres("tv")
    shows = trakt.get_recommendations("shows")
    items = []
    for show in shows:
        items.append(make_tvshow_item(get_tvshow_metadata_trakt(show, genres_dict)))
    if FORCE == True: return plugin.finish(items=items, sort_methods=SORT, view_mode=VIEW)
    else: return plugin.finish(items=items, sort_methods=SORT)
Ejemplo n.º 8
0
def movies_trakt_recommendations():
    from trakt import trakt
    genres_dict = dict([(x['slug'], x['name'])
                        for x in trakt.trakt_get_genres("movies")])
    movies = trakt.get_recommendations("movies")
    items = []
    for movie in movies:
        items.append(
            make_movie_item(get_trakt_movie_metadata(movie, genres_dict)))
    return items
Ejemplo n.º 9
0
def trakt_movies_recommendations_to_library():
    from trakt import trakt
    if dialogs.yesno(_("Scan item to library"), "{0}[CR]{1}".format(_("Add %s") % ("'{0} {1} {2}'".format("Trakt", _("movie"), _("Recommendations").lower())),_("Are you sure?"))):
        movies_add_all_to_library(trakt.get_recommendations("movies"))
Ejemplo n.º 10
0
def trakt_movies_recommendations(raw=False):
    from trakt import trakt
    genres_dict = dict([(x['slug'], x['name']) for x in trakt.trakt_get_genres("movies")])
    result = trakt.get_recommendations("movies")
    if raw: return result
    else: return list_trakt_movies_basic(result)