Browse Source

Add movie release Year

master
djib 2 years ago
parent
commit
7384c85567
  1. 7
      FreeboxMoviePlanner.py

7
FreeboxMoviePlanner.py

@ -33,15 +33,17 @@ class Movie:
self.date = 0
self.start_time = 0
self.end_time = 0
self.year = ''
def __str__(self):
return '{}: {} - {} ({})\n TMDB: {} - {}\n @ {}\n {}'.format(
return '{}: {} - {} ({})\n TMDB: {} - {} - {}\n @ {}\n {}'.format(
'Today' if self.day == '' else self.day,
self.title,
self.genre,
self.channel,
self.rating,
self.original_title,
self.year,
self.url,
self.overview
)
@ -217,6 +219,9 @@ class FreeboxMoviePlanner:
float(movie.rating) >= self.config['minimum-rating']
movie.url = 'https://www.themoviedb.org/movie/{}?language={}' \
.format(movie.tmdb_id, self.config['tmdb-language'])
movie.year = datetime.datetime.strptime(
tmdb_details['release_date'], '%Y-%m-%d'
).year
def _findMovieOnTMDB(self, movie):
logging.info("Searching for '{}' on TMDB".format(movie))

Loading…
Cancel
Save