Fix an crash in conflict detection when no movie is selected

master
djib 2 months ago
parent 2f0ce4ded4
commit 9c4d01eba2
  1. 29
      FreeboxMoviePlanner.py

@ -305,20 +305,21 @@ class FreeboxMoviePlanner:
def checkForConflicts(self):
programmed_movies = self.freebox.Pvr.Getting_the_list_of_precords()
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\n"
"http://192.168.1.254/#Fbx.os.app.pvr.app"
)
logging.info("Conflicting records detected '{}'".format(
conflicting_movies
))
if programmed_movies:
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\n"
"http://192.168.1.254/#Fbx.os.app.pvr.app"
)
logging.info("Conflicting records detected '{}'".format(
conflicting_movies
))
if __name__ == '__main__':

Loading…
Cancel
Save