From 954af9cf2d29c4c2ac6dc0ff850cbbfe68a10f40 Mon Sep 17 00:00:00 2001 From: Justin Emter Date: Fri, 1 Dec 2017 09:25:14 -0800 Subject: [PATCH] Recording last play date of movie in the DB. --- PseudoChannel.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/PseudoChannel.py b/PseudoChannel.py index 88f8620..d753348 100644 --- a/PseudoChannel.py +++ b/PseudoChannel.py @@ -434,13 +434,17 @@ class PseudoChannel(): ) )""" + the_movie = self.db.get_movie(random.choice(movies_list).title) + """Updating movies table in the db with lastPlayedDate entry""" self.db.update_movies_table_with_last_played_date(the_movie[3]) - the_movie = self.db.get_movie(random.choice(movies_list).title) except: print("For some reason, I've failed getting movie with xtra args.") the_movie = self.db.get_random_movie() + + """Updating movies table in the db with lastPlayedDate entry""" + self.db.update_movies_table_with_last_played_date(the_movie[3]) else: """the_movie = self.db.get_movie(self.movieMagic.get_random_movie( @@ -448,10 +452,11 @@ class PseudoChannel(): ) )""" + the_movie = self.db.get_random_movie() + """Updating movies table in the db with lastPlayedDate entry""" self.db.update_movies_table_with_last_played_date(the_movie[3]) - - the_movie = self.db.get_random_movie() + else: the_movie = self.db.get_movie(entry[3]) if the_movie != None: