mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-16 02:02:58 -07:00
Fix API creating a backup every sql query
This commit is contained in:
parent
13dac9c1ea
commit
6b94292c7e
1 changed files with 3 additions and 3 deletions
|
@ -311,8 +311,8 @@ class API2:
|
||||||
self.backup_db()
|
self.backup_db()
|
||||||
else:
|
else:
|
||||||
# If the backup is less then 24 h old lets make a backup
|
# If the backup is less then 24 h old lets make a backup
|
||||||
if any([os.path.getctime(os.path.join(plexpy.CONFIG.BACKUP_DIR, file_)) < (time.time() - 86400)
|
if not any(os.path.getctime(os.path.join(plexpy.CONFIG.BACKUP_DIR, file_)) > (time.time() - 86400)
|
||||||
and file_.endswith('.db') for file_ in os.listdir(plexpy.CONFIG.BACKUP_DIR)]):
|
and file_.endswith('.db') for file_ in os.listdir(plexpy.CONFIG.BACKUP_DIR)):
|
||||||
self.backup_db()
|
self.backup_db()
|
||||||
|
|
||||||
db = database.MonitorDatabase()
|
db = database.MonitorDatabase()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue