예제 #1
0
def commandAS(commands, mm):
    title = commands[1]
    director_name = commands[2]
    description = input()
    if not mml.has_director(mm, director_name):
        print("Realizador inexistente.")
    if not mml.has_movie(mm, title, director_name):
        print("Filme inexistente.")
    else:
        mml.set_description(mm, title, director_name, description)
        print("Sinopse alterada com sucesso.")
예제 #2
0
def commandAR(commands, mm):
    title = commands[1]
    director_name = commands[2]
    rating = commands[3]
    if not mml.has_director(mm, director_name):
        print("Realizador inexistente.")
    elif not mml.has_movie(mm, title, director_name):
        print("Filme inexistente.")
    else:
        mml.change_rating(mm, director_name, title, rating)
        print("Rating alterado com sucesso.")
예제 #3
0
def commandRF(commands, mm):
    title = commands[1]
    director_name = commands[2]
    genre = commands[3]

    if not mml.has_director(mm, director_name):
        print("Realizador inexistente.")
    else:
        if mml.has_movie(mm, title, director_name):
            print("Filme existente.")
        else:
            mml.add_movie(mm, title, director_name, genre)
            print("Filme adicionado com sucesso")
예제 #4
0
def commandAA(commands, mm):
    title = commands[1]
    director_name = commands[2]
    actor_name = commands[3]
    if not mml.has_director(mm, director_name):
        print("Realizador inexistente")
    else:
        if not mml.has_movie(mm, director_name, title):
            print("Filme inexistente")
        else:
            if not mml.has_actor(mm, director_name, title, actor_name):
                print("Actor inexistente")
            else:
                mml.add_actor_to_movie(mm, actor_name, title, director_name)
                print("Ator adicionado com sucesso")