def create_tv_show_items(tv_shows): items = [] missing_meta = [] for tv_show in tv_shows: name = "%s (%s)" % (tv_show['name'], tv_show['year']) imdb_id = tv_show['imdb_id'] items.append(create_tv_show_tuple(name, imdb_id)) if not meta_exist(imdb_id, META_PATH): missing_meta.append(imdb_id) return items, missing_meta
def create_movie_items(movies): items = [] missing_meta = [] for movie in movies: name = "%s (%s)" % (movie['name'], movie['year']) imdb_id = movie['imdb_id'] items.append(create_movie_tuple(name, imdb_id)) if not meta_exist(imdb_id, META_PATH): missing_meta.append(imdb_id) return items, missing_meta