Пример #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)
Пример #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
Пример #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
Пример #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
Пример #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)
Пример #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"))
Пример #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)
Пример #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
Пример #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"))
Пример #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)