From 56cf5979f0ce27b8f15cde89c6aa1c5a9b4b01a6 Mon Sep 17 00:00:00 2001 From: djib Date: Sat, 12 Oct 2019 09:40:10 +0200 Subject: [PATCH] Fix margin (in seconds not minutes) --- FreeboxMoviePlanner.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/FreeboxMoviePlanner.py b/FreeboxMoviePlanner.py index f49bdfa..d70a3d6 100755 --- a/FreeboxMoviePlanner.py +++ b/FreeboxMoviePlanner.py @@ -179,7 +179,7 @@ class FreeboxMoviePlanner: for movie in self.movies: print() print(movie) - reply = input("Interested? (y)es/(N)o/(q)uit") + reply = input("Interested? (y)es/(N)o/(q)uit: ") if reply.upper() == "Y": movie.user_selected = True elif reply.upper() == "Q": @@ -245,8 +245,8 @@ class FreeboxMoviePlanner: 'start': int(movie.start_time.timestamp()), 'end': int(movie.end_time.timestamp()), 'name': movie.title, - 'margin_before': self.config['margin-before'], - 'margin_after': self.config['margin-after'] + 'margin_before': 60*self.config['margin-before'], + 'margin_after': 60*self.config['margin-after'] } self.freebox.Pvr.Create_a_precord(data) print("Programmed '{}'".format(movie)) @@ -256,13 +256,14 @@ class FreeboxMoviePlanner: conflicting_movies = [m for m in programmed_movies if m['conflict']] if conflicting_movies: print( + "\n" "!!!!!!!!!\n" "!Warning!\n" "!!!!!!!!!\n" "Conflicting records detected, please " "check your Freebox interface" ) - logging.warning("Conflicting records detected '{}'".format( + logging.info("Conflicting records detected '{}'".format( conflicting_movies )) @@ -282,7 +283,7 @@ if __name__ == '__main__': ) args = parser.parse_args() - print("Working the magic… please wait…") + print("Working the magic, please wait…") if args.day: movies = TVGuideScraper._getMovies() else: