diff --git a/data/interfaces/default/configuration_table.html b/data/interfaces/default/configuration_table.html index 36a4b9dc..0a056bb2 100644 --- a/data/interfaces/default/configuration_table.html +++ b/data/interfaces/default/configuration_table.html @@ -31,15 +31,15 @@ DOCUMENTATION :: END % endif Configuration File: - ${plexpy.CONFIG_FILE} + ${plexpy.CONFIG_FILE} Database File: - ${plexpy.DB_FILE} + ${plexpy.DB_FILE} Log File: - ${os.path.join(plexpy.CONFIG.LOG_DIR, logger.FILENAME)} + ${os.path.join(plexpy.CONFIG.LOG_DIR, logger.FILENAME)} Backup Directory: @@ -128,5 +128,11 @@ DOCUMENTATION :: END $('#support-modal').modal('hide'); }); }); + + $('body').tooltip({ + selector: '[data-toggle="tooltip"]', + container: 'body' + }); + }); \ No newline at end of file diff --git a/data/interfaces/default/settings.html b/data/interfaces/default/settings.html index 7702cba9..a428e9a3 100644 --- a/data/interfaces/default/settings.html +++ b/data/interfaces/default/settings.html @@ -615,7 +615,8 @@

- Set the complete folder path where your Plex Server logs are, shortcuts are not recognized. + Optional: Set your Plex logs folder to use PlexPy as a log viewer. Plex logs are not needed for PlexPy to function. + A complete folder path is required, shortcuts are not recognized. Click here for help.

@@ -960,7 +961,7 @@ -

The path to your git environment variable. Leave blank for default.

+

Optional: The path to your git environment variable. Leave blank for default.

% endif diff --git a/plexpy/webserve.py b/plexpy/webserve.py index 84616015..5dc4ee11 100644 --- a/plexpy/webserve.py +++ b/plexpy/webserve.py @@ -3630,6 +3630,37 @@ class WebInterface(object): return serve_file(path=fp, content_type='image/png') + @cherrypy.expose + @requireAuth(member_of("admin")) + @addtoapi() + def download_config(self, **kwargs): + """ Download the PlexPy configuration file. """ + config_file = config.FILENAME + + try: + plexpy.CONFIG.write() + except: + pass + + return serve_download(plexpy.CONFIG_FILE, name=config_file) + + @cherrypy.expose + @requireAuth(member_of("admin")) + @addtoapi() + def download_database(self, **kwargs): + """ Download the PlexPy database file. """ + database_file = database.FILENAME + + try: + db = database.MonitorDatabase() + db.connection.execute('begin immediate') + shutil.copyfile(plexpy.DB_FILE, os.path.join(plexpy.CONFIG.CACHE_DIR, database_file)) + db.connection.rollback() + except: + pass + + return serve_download(os.path.join(plexpy.CONFIG.CACHE_DIR, database_file), name=database_file) + @cherrypy.expose @requireAuth(member_of("admin")) @addtoapi()