Add flush temporary sessions button in settings

This commit is contained in:
JonnyWong16 2016-09-27 21:47:12 -07:00
parent 4797b1a3b7
commit de3f813b46
3 changed files with 24 additions and 4 deletions

View file

@ -48,10 +48,10 @@ def delete_sessions():
try:
monitor_db.action('DELETE FROM sessions')
monitor_db.action('VACUUM')
return 'Cleared temporary sessions.'
return True
except Exception as e:
logger.warn(u"PlexPy Database :: Unable to clear temporary sessions from database: %s." % e)
return 'Unable to clear temporary sessions.'
return False
def db_filename(filename=FILENAME):
""" Returns the filepath to the db """