diff --git a/tmdb.py b/tmdb.py index 39686f2..e6bb9f8 100644 --- a/tmdb.py +++ b/tmdb.py @@ -73,7 +73,8 @@ class Tmdb: # get a number of trailers of a certain kind for a list of recommended movies def get_trailers(self, recommendations, cliptype, count): results = [] - # loop over list of recommendations + # loop over ten out of the list of recommendations + random.shuffle(recommendations) for recommendation in recommendations[:10]: all_trailers = self.get_movie_trailers(recommendation['movieid']) # filter to get only a certain kind of trailer