Backup config file

This commit is contained in:
JonnyWong16 2016-05-12 22:00:34 -07:00
parent b0eb98c667
commit 6aa786698e
9 changed files with 127 additions and 64 deletions

View file

@ -31,6 +31,7 @@ import cherrypy
import xmltodict
import plexpy
import config
import database
import logger
import plextv
@ -295,6 +296,18 @@ class API2:
self.data = rows
return rows
def backup_config(self):
""" Create a manual backup of the `config.ini` file. """
data = config.make_backup()
if data:
self.result_type = 'success'
else:
self.result_type = 'failed'
return data
def backup_db(self):
""" Create a manual backup of the `plexpy.db` file. """