Add backup back to api

This commit is contained in:
JonnyWong16 2016-02-18 06:53:07 -08:00
parent e38e98d9e7
commit 1c8428c3ea
2 changed files with 13 additions and 2 deletions

View file

@ -275,6 +275,18 @@ class API2:
self.data = rows
return rows
def backupdb(self):
""" Creates a manual backup of the plexpy.db file """
data = database.make_backup()
if data:
self.result_type = 'success'
else:
self.result_type = 'failed'
return data
def restart(self, **kwargs):
""" Restarts plexpy """