Browse Source

Fix margin (in seconds not minutes)

master
djib 2 years ago
parent
commit
56cf5979f0
  1. 11
      FreeboxMoviePlanner.py

11
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:

Loading…
Cancel
Save