File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -457,11 +457,7 @@ def watchlist_movies(self):
457457 data = paginate ('users/{username}/watchlist/movies' ,
458458 username = slugify (self .username ),
459459 )
460- self ._movie_watchlist = []
461- for movie in data :
462- mov = movie .pop ('movie' )
463- mov .update (movie )
464- self ._movie_watchlist .append (Movie (** mov ))
460+ self ._movie_watchlist = self ._build_movies (data or [])
465461 return self ._movie_watchlist
466462
467463 @property
@@ -515,12 +511,12 @@ def _build_movies(data):
515511 :param data: List of raw movie dicts from the Trakt API
516512 :return: List of :class:`Movie` instances
517513 """
518- watched_movies = []
514+ movies = []
519515 for movie in data :
520516 movie_data = movie .pop ('movie' )
521517 movie_data .update (movie )
522- watched_movies .append (Movie (** movie_data ))
523- return watched_movies
518+ movies .append (Movie (** movie_data ))
519+ return movies
524520
525521 @get
526522 def get_watched_movies (self , page = None , limit = None ):
You can’t perform that action at this time.
0 commit comments