Ejemplo n.º 1
0
def watchlist_movies():
    """Create movie watchlist window"""
    movies = utilities.getWatchlistMoviesFromTrakt()

    if movies == None: # movies = None => there was an error
        return # error already displayed in utilities.py

    if len(movies) == 0:
        xbmcgui.Dialog().ok(_(200), _(134))
        return

    _create_window('watchlist', movies, _WINDOW_TYPE_MOVIES)
Ejemplo n.º 2
0
def trending_movies():
    """Create tending movies window"""
    movies = utilities.getTrendingMoviesFromTrakt()
    watchlist = utilities.traktMovieListByImdbID(utilities.getWatchlistMoviesFromTrakt())

    if movies == None: # movies = None => there was an error
        return # error already displayed in utilities.py

    if len(movies) == 0:
        xbmcgui.Dialog().ok(_(200), _(160))
        return

    for movie in movies:
        if movie['imdb_id'] in watchlist:
            movie['watchlist'] = True
        else:
            movie['watchlist'] = False

    _create_window('trending', movies, _WINDOW_TYPE_MOVIES)