Fix margin (in seconds not minutes)
This commit is contained in:
@ -179,7 +179,7 @@ class FreeboxMoviePlanner:
|
|||||||
for movie in self.movies:
|
for movie in self.movies:
|
||||||
print()
|
print()
|
||||||
print(movie)
|
print(movie)
|
||||||
reply = input("Interested? (y)es/(N)o/(q)uit")
|
reply = input("Interested? (y)es/(N)o/(q)uit: ")
|
||||||
if reply.upper() == "Y":
|
if reply.upper() == "Y":
|
||||||
movie.user_selected = True
|
movie.user_selected = True
|
||||||
elif reply.upper() == "Q":
|
elif reply.upper() == "Q":
|
||||||
@ -245,8 +245,8 @@ class FreeboxMoviePlanner:
|
|||||||
'start': int(movie.start_time.timestamp()),
|
'start': int(movie.start_time.timestamp()),
|
||||||
'end': int(movie.end_time.timestamp()),
|
'end': int(movie.end_time.timestamp()),
|
||||||
'name': movie.title,
|
'name': movie.title,
|
||||||
'margin_before': self.config['margin-before'],
|
'margin_before': 60*self.config['margin-before'],
|
||||||
'margin_after': self.config['margin-after']
|
'margin_after': 60*self.config['margin-after']
|
||||||
}
|
}
|
||||||
self.freebox.Pvr.Create_a_precord(data)
|
self.freebox.Pvr.Create_a_precord(data)
|
||||||
print("Programmed '{}'".format(movie))
|
print("Programmed '{}'".format(movie))
|
||||||
@ -256,13 +256,14 @@ class FreeboxMoviePlanner:
|
|||||||
conflicting_movies = [m for m in programmed_movies if m['conflict']]
|
conflicting_movies = [m for m in programmed_movies if m['conflict']]
|
||||||
if conflicting_movies:
|
if conflicting_movies:
|
||||||
print(
|
print(
|
||||||
|
"\n"
|
||||||
"!!!!!!!!!\n"
|
"!!!!!!!!!\n"
|
||||||
"!Warning!\n"
|
"!Warning!\n"
|
||||||
"!!!!!!!!!\n"
|
"!!!!!!!!!\n"
|
||||||
"Conflicting records detected, please "
|
"Conflicting records detected, please "
|
||||||
"check your Freebox interface"
|
"check your Freebox interface"
|
||||||
)
|
)
|
||||||
logging.warning("Conflicting records detected '{}'".format(
|
logging.info("Conflicting records detected '{}'".format(
|
||||||
conflicting_movies
|
conflicting_movies
|
||||||
))
|
))
|
||||||
|
|
||||||
@ -282,7 +283,7 @@ if __name__ == '__main__':
|
|||||||
)
|
)
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
print("Working the magic… please wait…")
|
print("Working the magic, please wait…")
|
||||||
if args.day:
|
if args.day:
|
||||||
movies = TVGuideScraper._getMovies()
|
movies = TVGuideScraper._getMovies()
|
||||||
else:
|
else:
|
||||||
|
Reference in New Issue
Block a user