Backup config file
This commit is contained in:
@@ -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. """
|
||||
|
||||
|
Reference in New Issue
Block a user