diff --git a/soitool/database.py b/soitool/database.py index 3f645bf460f447ddd2371ede2c33b255dc830d1f..7705bf03fb42cf22bfa140f1031cd5724b6cafb1 100644 --- a/soitool/database.py +++ b/soitool/database.py @@ -231,6 +231,7 @@ class Database: self.conn.execute(stmt, (codes.pop(), words[i][0])) # Updates LastUpdated with current time self.update_last_updated() + print("Code in CodeBook updated") def seconds_to_next_update(self, period): @@ -263,7 +264,7 @@ class Database: def update_codebook_auto(self): """Update Codebook if needed and set new time for timer.""" - if self.seconds_to_next_update(SECONDS_IN_24H) < 10: + if self.seconds_to_next_update(SECONDS_IN_24H) <= 0: self.update_codebook() self.timer.setInterval( self.seconds_to_next_update(SECONDS_IN_24H * 1000)