Esempio n. 1
0
def genre_to_dict(genre: Genre, repo: AbstractRepository):
    genre_dict = {
        'name':
        genre,
        'tagged_movies':
        [movie.id for movie in repo.get_movies() if genre in movie.genres]
    }
    return genre_dict
Esempio n. 2
0
def get_titles(repo: AbstractRepository):
    movies = repo.get_movies()
    titles = [movie.title for movie in movies]

    return titles