Exemple #1
0
def movies_trakt_watchlist_to_library():
    from trakt import trakt
    if dialogs.yesno(
            _("Add all to library"),
            _("Are you sure you want to add your entire Trakt watchlist to Kodi library?"
              )):
        movies_add_all_to_library(trakt.trakt_get_watchlist("movies"))
Exemple #2
0
def trakt_movies_watchlist_to_library(preaprove = False, uncached = False):
    from trakt import trakt
    if preaprove  or dialogs.yesno(_("Scan item to library"), "{0}[CR]{1}".format(_("Add %s") % ("'{0} {1} {2}'".format("Trakt", _("movie"), _("Watchlist").lower())),_("Are you sure?"))):
        if uncached:
            movies_add_all_to_library(trakt.trakt_get_watchlist_uncached("movies"), True)
        else:
            movies_add_all_to_library(trakt.trakt_get_watchlist("movies"))
Exemple #3
0
def trakt_movies_watchlist_to_library(preaprove = False, uncached = False):
    from trakt import trakt
    if preaprove  or dialogs.yesno(_("Scan item to library"), "{0}[CR]{1}".format(_("Add %s") % ("'{0} {1} {2}'".format("Trakt", _("movie"), _("Watchlist").lower())),_("Are you sure?"))):
        if uncached:
            movies_add_all_to_library(trakt.trakt_get_watchlist_uncached("movies"), True)
        else:
            movies_add_all_to_library(trakt.trakt_get_watchlist("movies"))
Exemple #4
0
def trakt_movies_watchlist_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"),
                                                      _("Watchlist").lower())),
                _("Are you sure?"))):
        movies_add_all_to_library(trakt.trakt_get_watchlist("movies"))
Exemple #5
0
def sync_trakt_watchlist_del():
    from trakt import trakt
    library_folder = setup_library(
        plugin.get_setting(SETTING_MOVIES_LIBRARY_FOLDER, unicode))
    shows = xbmcvfs.listdir(library_folder)[0]
    items = trakt.trakt_get_watchlist("movies")

    # Convert watchlist items to ids list
    if "results" in items:
        ids = [str(r["id"]) for r in items["results"]]
    else:
        vals = [
            i["movie"]["ids"]["imdb"] if i["movie"]["ids"]["imdb"] != None
            and i["movie"]["ids"]["imdb"] != "" else i["movie"]["ids"]["tmdb"]
            for i in items
        ]
        ids = [str(ii) for ii in vals]

    ## Make list of local shows not in watchlist
    del_list = [x for x in shows if x not in ids]
    plugin.log.debug("del_list_movie: " + str(del_list))
    if del_list:
        remove_unlisted_movie(del_list)
Exemple #6
0
def movies_trakt_watchlist():
    from trakt import trakt
    result = trakt.trakt_get_watchlist("movies")
    return plugin.finish(list_trakt_movies(result),
                         sort_methods=MOVIE_SORT_METHODS)
Exemple #7
0
def movies_trakt_watchlist_to_library():
    from trakt import trakt
    if dialogs.yesno(_("Add all to library"), _("Are you sure you want to add your entire Trakt watchlist to Kodi library?")):
        movies_add_all_to_library(trakt.trakt_get_watchlist("movies"))
Exemple #8
0
def movies_trakt_watchlist():
    from trakt import trakt
    result = trakt.trakt_get_watchlist("movies")
    return plugin.finish(list_trakt_movies(result), sort_methods=MOVIE_SORT_METHODS)
Exemple #9
0
def tv_trakt_watchlist():
    from trakt import trakt
    result = trakt.trakt_get_watchlist("shows")
    return list_trakt_tvshows(result)
Exemple #10
0
def trakt_movies_watchlist():
    from trakt import trakt
    result = trakt.trakt_get_watchlist("movies")
    items = list_trakt_movies(result)
    if FORCE == True: return plugin.finish(items=items, sort_methods=SORT, view_mode=VIEW)
    else: return plugin.finish(items=items, sort_methods=SORT)
Exemple #11
0
def tv_trakt_watchlist():
    from trakt import trakt
    result = trakt.trakt_get_watchlist("shows")
    return list_trakt_tvshows(result)
Exemple #12
0
def trakt_movies_watchlist(raw=False):
    from trakt import trakt
    result = trakt.trakt_get_watchlist("movies")
    if raw: return result
    else: return list_trakt_movies_plain(result)
Exemple #13
0
def trakt_movies_watchlist(raw=False):
    from trakt import trakt
    result = trakt.trakt_get_watchlist("movies")
    if raw: return result
    else: return list_trakt_movies_plain(result)
Exemple #14
0
def trakt_tv_watchlist():
    from trakt import trakt
    result = trakt.trakt_get_watchlist("shows")
    items = list_trakt_tvshows(result)
    if FORCE == True: return plugin.finish(items=items, sort_methods=SORT, view_mode=VIEW)
    else: return plugin.finish(items=items, sort_methods=SORT)