from vcinema_utils.VCinemaUtils import * from vcinema_utils.Viewing import Viewing class VCinemaFilm: def __init__(self, title, imdb_id): self._title = title self._imdb_id = imdb_id self._viewings = [] self._imdb_data = {} def add_viewing(self, date, season, rating): viewing = Viewing(date, season, rating) self._viewings.append(viewing) def add_imdb_data(self, field, value): self._imdb_data[field] = value def get_imdb_data(self, field): if field in self._imdb_data: return self._imdb_data[field] else: return None def get_imdb_url(self): return "https://www.imdb.com/title/tt{}/".format(self._imdb_id) def get_imdb_link(self): return generate_markdown_link(self._title, self.get_imdb_url()) def get_title(self): return self._title def get_imdb_id(self): return self._imdb_id