Why don't we just use `media['type'] here?
What you do now is `if type == 'movie': return 'movie'`