From 187f9d7cd4c7786b3d5dc05bb24bd8164b350e04 Mon Sep 17 00:00:00 2001 From: Tim Date: Sat, 25 Jul 2015 10:34:41 +0200 Subject: [PATCH] Remove old config page and references to it. Remote old PlexWatch database references. --- data/interfaces/default/config.html | 1338 ----------------- data/interfaces/default/home_stats.html | 2 +- .../default/user_platform_stats.html | 2 +- .../default/user_recently_watched.html | 2 +- .../default/user_watch_time_stats.html | 2 +- plexpy/webserve.py | 110 +- 6 files changed, 5 insertions(+), 1451 deletions(-) delete mode 100644 data/interfaces/default/config.html diff --git a/data/interfaces/default/config.html b/data/interfaces/default/config.html deleted file mode 100644 index 67caa818..00000000 --- a/data/interfaces/default/config.html +++ /dev/null @@ -1,1338 +0,0 @@ -<%inherit file="base.html"/> -<%! - import plexpy - import string -%> - -<%def name="headerIncludes()"> - - - -<%def name="body()"> -
-
-
-
-
-

Settings

-
-
- % if config['check_github']: - - % endif - - -
-
-
-
-
- - - -
- -
-
Web Interface changes require a restart to take effect.
-
-
-
-
-
-
-

Basic

-
-
- - -

e.g. localhost or an IP, such as 0.0.0.0

-
-
- - -

Port to bind web server to. Note that ports below 1024 may require root.

-
-
- Launch Browser on Startup -

Launch browser pointed to PlexPy, on startup.

-
-
- Enable HTTPS -

Enable HTTPS for web server for encrypted communication.

-
-
-
- - -
-
- - -
-
-
-
-
-
-
-

Authentication

-
-
- - -

Username for web server authentication. Leave empty to disable.

-
-
- - -

Password for web server authentication. Leave empty to disable.

-
-
-
-
-
-
-

API

-
-
- Enable API -

Allow remote applications to interface with PlexPy.

-
-
- - - -

Current API key:
${config['api_key']}

-
-
-
-
-

Software Updates

-
-
- Enable Updates -

If you have Git installed, allow periodic checks for updates.

-
-
-
-
-
-
- -
- -
-
-
-
-
-
-
-

General

-
-
- - -

Set your preferred date format. Click here to see the parameter list.

-
-
- - -

Set your preferred time format. Click here to see the parameter list.

-
-
-
-
-

Plex.tv Authentication

-
-
- - -

Token for Plex.tv authentication.

-
-

Fetch Token

-
-
-
-
-
-
-

Plex Media Server

-
-
- - -

IP Address or hostname for Plex Media Server.

-
-
- Remote Server -

Check this is your Plex Server is not on the same local network as PlexPy.

-
-
- Force SSL -

Force PlexPy to connect to your Plex Server via SSL. Your server needs to have remote access enabled.

-
-
- - -

Port that Plex Media Server is listening on.

-
- - Verify -
-
-
-
-

Extra Settings

-
-
-
- Use BIF thumbs -

If you have media indexing enabled on your server, use these on the activity pane.

-
-
-
-

Plex Logs

-
-
-
- - -

Set the folder where your Plex Server logs are. This is required if you enable IP logging.
Click here for help.

-
-
- -
-
-
-
- -
- -
-
These features are currently experimental, please report any bugs on the Github project page Here
-
-
-
-
-
-

Monitoring Settings

-
-
-
- - -

The interval (in seconds) PlexPy will ping your Plex Server. Min 30 seconds, Recommended 60 seconds. 0 to disable.

-

Disabling monitoring will disable ALL notifications and history logging.

-
-
-
-

User List

-
-
-
- - -

The interval (in hours) PlexPy will request an updated friends list from Plex.tv. 0 to disable.

-
-
- Refresh user list on startup -

Refresh the user list when PlexPy starts.

-
-
-
-

PlexWatch Import Tool

-
-
-

Click here to Import an existing Plexwatch database.

-
-
-
-
-

History Logging

-
-
-
- Log Movies and TV -

Keep records of all video items played from your Plex Media Server.

-
-
- - -

The interval (in seconds) PlexPy will wait for a video item to be active before logging it. 0 to disable.

-
-
- Log Music -

Keep records of all audio items played from your Plex Media Server. VERY experimental.

-
-
-
-

IP Logging

-
-
-
- Enable IP Logging -

- Enable this to attempt to log the IP address of the user. Debug logging must be enabled and your log folder must be set in the PlexPy settings. -

-
-
-
-
-
-

Global Notifications

-
-
-
-
-
- Enable TV Notifications -
-
-
-
-
- Notify on playback start -
-
- Notify on playback stop -
-
- Notify on playback pause -
-
-
-
-
-
-
- Enable Movie Notifications -
-
-
-
-
- Notify on playback start -
-
- Notify on playback stop -
-
- Notify on playback pause -
-
-
-
-
-
-
- Enable Music Notifications -
-
-
-
-
- Notify on playback start -
-
- Notify on playback stop -
-
- Notify on playback pause -
-
-
-
-
-
-
-
-
-
- -
- -
-
-
-
-
-
-
-

Growl

-
-
- Enable Growl Notifications -
-
-
- - -
-
- - -
-
-
-
-
-

Prowl

-
-
- Enable Prowl Notifications -
-
-
- - -
-
- - -
-
-
- -
-
-

XBMC

-
-
- Enable XBMC Notifications -
-
-
- - -

e.g. http://localhost:8080. Separate hosts with commas.

-
-
- - -
-
- - -
-
-
-
-
-

Plex Home Theatre

-
-
- Enable Plex Notifications -
-
-
- - -

Host running Plex Client (eg. http://192.168.1.100:3000).

-
-
- - -

Username of your Plex client API (blank for none).

-
-
- - -

Password of your Plex client API (blank for none).

-
-
-
-
- -
-
-
-

NotifyMyAndroid

-
-
- Enable NotifyMyAndroid -
-
-
- - -

Separate multiple api keys with commas.

-
-
- - -
-
-
- -
-
-

Pushalot

-
-
- Enable Pushalot -
-
-
- - -

Separate multiple api keys with commas.

-
-
-
- -
-
-

Email

-
-
- Enable Email Notifications -
-
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- TLS -
-
-
-
- -
-
-
-

Pushover

-
-
- Enable Pushover Notifications -
-
-
- - -
-
- - -
-
- - -
-
-
- -
-
-

Pushbullet

-
-
- Enable PushBullet Notifications -
-
-
- - -
-
- - -
-
-
- - -
-
-

OS X

-
-
- Enable OS X Notifications -
-
-
- - - -

Enter the path/application name to be registered with the Notification Center, default is /Applications/PlexPy.

-
-
-
- -
-
-

Boxcar2

-
-
- Enable Boxcar2 Notifications -
-
-
- - -
-
-
- -
-
-
-
-
- -
-
-
-
-
-
- - - -
-
- - -<%def name="javascriptIncludes()"> - - - diff --git a/data/interfaces/default/home_stats.html b/data/interfaces/default/home_stats.html index 75e45bfa..71c0e232 100644 --- a/data/interfaces/default/home_stats.html +++ b/data/interfaces/default/home_stats.html @@ -152,6 +152,6 @@ DOCUMENTATION :: END
No stats for selected period.

% endif % else: -
There was an error loading your PlexWatch data. Please check your settings. +
Unable to retrieve data from database. Please check your settings.

% endif \ No newline at end of file diff --git a/data/interfaces/default/user_platform_stats.html b/data/interfaces/default/user_platform_stats.html index c2869917..a0849735 100644 --- a/data/interfaces/default/user_platform_stats.html +++ b/data/interfaces/default/user_platform_stats.html @@ -42,6 +42,6 @@ DOCUMENTATION :: END % endfor % else: -
There was an error loading your PlexWatch data. Please check your settings. +
Unable to retrieve data from database. Please check your settings.

% endif \ No newline at end of file diff --git a/data/interfaces/default/user_recently_watched.html b/data/interfaces/default/user_recently_watched.html index a65785dd..371662a5 100644 --- a/data/interfaces/default/user_recently_watched.html +++ b/data/interfaces/default/user_recently_watched.html @@ -57,6 +57,6 @@ DOCUMENTATION :: END
% else: -
There was an error loading your PlexWatch data. Please check your settings. +
Unable to retrieve data from database. Please check your settings.

% endif \ No newline at end of file diff --git a/data/interfaces/default/user_watch_time_stats.html b/data/interfaces/default/user_watch_time_stats.html index a2781182..bbc2b1d1 100644 --- a/data/interfaces/default/user_watch_time_stats.html +++ b/data/interfaces/default/user_watch_time_stats.html @@ -44,6 +44,6 @@ DOCUMENTATION :: END % endfor % else: -
There was an error loading your PlexWatch data. Please check your settings. +
Unable to retrieve data from database. Please check your settings.

% endif \ No newline at end of file diff --git a/plexpy/webserve.py b/plexpy/webserve.py index 679d788b..32ef3941 100644 --- a/plexpy/webserve.py +++ b/plexpy/webserve.py @@ -299,114 +299,6 @@ class WebInterface(object): logger.info("New API generated") return apikey - @cherrypy.expose - def config(self): - interface_dir = os.path.join(plexpy.PROG_DIR, 'data/interfaces/') - interface_list = [name for name in os.listdir(interface_dir) if - os.path.isdir(os.path.join(interface_dir, name))] - - # Initialise blank passwords so we do not expose them in the html forms - # but users are still able to clear them - if plexpy.CONFIG.HTTP_PASSWORD != '': - http_password = ' ' - else: - http_password = '' - - config = { - "http_host": plexpy.CONFIG.HTTP_HOST, - "http_username": plexpy.CONFIG.HTTP_USERNAME, - "http_port": plexpy.CONFIG.HTTP_PORT, - "http_password": http_password, - "launch_browser": checked(plexpy.CONFIG.LAUNCH_BROWSER), - "enable_https": checked(plexpy.CONFIG.ENABLE_HTTPS), - "https_cert": plexpy.CONFIG.HTTPS_CERT, - "https_key": plexpy.CONFIG.HTTPS_KEY, - "api_enabled": checked(plexpy.CONFIG.API_ENABLED), - "api_key": plexpy.CONFIG.API_KEY, - "update_db_interval": plexpy.CONFIG.UPDATE_DB_INTERVAL, - "freeze_db": checked(plexpy.CONFIG.FREEZE_DB), - "log_dir": plexpy.CONFIG.LOG_DIR, - "cache_dir": plexpy.CONFIG.CACHE_DIR, - "check_github": checked(plexpy.CONFIG.CHECK_GITHUB), - "interface_list": interface_list, - "growl_enabled": checked(plexpy.CONFIG.GROWL_ENABLED), - "growl_host": plexpy.CONFIG.GROWL_HOST, - "growl_password": plexpy.CONFIG.GROWL_PASSWORD, - "prowl_enabled": checked(plexpy.CONFIG.PROWL_ENABLED), - "prowl_keys": plexpy.CONFIG.PROWL_KEYS, - "prowl_priority": plexpy.CONFIG.PROWL_PRIORITY, - "xbmc_enabled": checked(plexpy.CONFIG.XBMC_ENABLED), - "xbmc_host": plexpy.CONFIG.XBMC_HOST, - "xbmc_username": plexpy.CONFIG.XBMC_USERNAME, - "xbmc_password": plexpy.CONFIG.XBMC_PASSWORD, - "plex_enabled": checked(plexpy.CONFIG.PLEX_ENABLED), - "plex_client_host": plexpy.CONFIG.PLEX_CLIENT_HOST, - "plex_username": plexpy.CONFIG.PLEX_USERNAME, - "plex_password": plexpy.CONFIG.PLEX_PASSWORD, - "nma_enabled": checked(plexpy.CONFIG.NMA_ENABLED), - "nma_apikey": plexpy.CONFIG.NMA_APIKEY, - "nma_priority": int(plexpy.CONFIG.NMA_PRIORITY), - "pushalot_enabled": checked(plexpy.CONFIG.PUSHALOT_ENABLED), - "pushalot_apikey": plexpy.CONFIG.PUSHALOT_APIKEY, - "pushover_enabled": checked(plexpy.CONFIG.PUSHOVER_ENABLED), - "pushover_keys": plexpy.CONFIG.PUSHOVER_KEYS, - "pushover_apitoken": plexpy.CONFIG.PUSHOVER_APITOKEN, - "pushover_priority": plexpy.CONFIG.PUSHOVER_PRIORITY, - "pushbullet_enabled": checked(plexpy.CONFIG.PUSHBULLET_ENABLED), - "pushbullet_apikey": plexpy.CONFIG.PUSHBULLET_APIKEY, - "pushbullet_deviceid": plexpy.CONFIG.PUSHBULLET_DEVICEID, - "twitter_enabled": checked(plexpy.CONFIG.TWITTER_ENABLED), - "osx_notify_enabled": checked(plexpy.CONFIG.OSX_NOTIFY_ENABLED), - "osx_notify_app": plexpy.CONFIG.OSX_NOTIFY_APP, - "boxcar_enabled": checked(plexpy.CONFIG.BOXCAR_ENABLED), - "boxcar_token": plexpy.CONFIG.BOXCAR_TOKEN, - "cache_sizemb": plexpy.CONFIG.CACHE_SIZEMB, - "email_enabled": checked(plexpy.CONFIG.EMAIL_ENABLED), - "email_from": plexpy.CONFIG.EMAIL_FROM, - "email_to": plexpy.CONFIG.EMAIL_TO, - "email_smtp_server": plexpy.CONFIG.EMAIL_SMTP_SERVER, - "email_smtp_user": plexpy.CONFIG.EMAIL_SMTP_USER, - "email_smtp_password": plexpy.CONFIG.EMAIL_SMTP_PASSWORD, - "email_smtp_port": int(plexpy.CONFIG.EMAIL_SMTP_PORT), - "email_tls": checked(plexpy.CONFIG.EMAIL_TLS), - "pms_identifier": plexpy.CONFIG.PMS_IDENTIFIER, - "pms_ip": plexpy.CONFIG.PMS_IP, - "pms_logs_folder": plexpy.CONFIG.PMS_LOGS_FOLDER, - "pms_port": plexpy.CONFIG.PMS_PORT, - "pms_token": plexpy.CONFIG.PMS_TOKEN, - "pms_ssl": checked(plexpy.CONFIG.PMS_SSL), - "pms_use_bif": checked(plexpy.CONFIG.PMS_USE_BIF), - "pms_uuid": plexpy.CONFIG.PMS_UUID, - "plexwatch_database": plexpy.CONFIG.PLEXWATCH_DATABASE, - "date_format": plexpy.CONFIG.DATE_FORMAT, - "time_format": plexpy.CONFIG.TIME_FORMAT, - "grouping_global_history": checked(plexpy.CONFIG.GROUPING_GLOBAL_HISTORY), - "grouping_user_history": checked(plexpy.CONFIG.GROUPING_USER_HISTORY), - "grouping_charts": checked(plexpy.CONFIG.GROUPING_CHARTS), - "tv_notify_enable": checked(plexpy.CONFIG.TV_NOTIFY_ENABLE), - "movie_notify_enable": checked(plexpy.CONFIG.MOVIE_NOTIFY_ENABLE), - "music_notify_enable": checked(plexpy.CONFIG.MUSIC_NOTIFY_ENABLE), - "tv_notify_on_start": checked(plexpy.CONFIG.TV_NOTIFY_ON_START), - "movie_notify_on_start": checked(plexpy.CONFIG.MOVIE_NOTIFY_ON_START), - "music_notify_on_start": checked(plexpy.CONFIG.MUSIC_NOTIFY_ON_START), - "tv_notify_on_stop": checked(plexpy.CONFIG.TV_NOTIFY_ON_STOP), - "movie_notify_on_stop": checked(plexpy.CONFIG.MOVIE_NOTIFY_ON_STOP), - "music_notify_on_stop": checked(plexpy.CONFIG.MUSIC_NOTIFY_ON_STOP), - "tv_notify_on_pause": checked(plexpy.CONFIG.TV_NOTIFY_ON_PAUSE), - "movie_notify_on_pause": checked(plexpy.CONFIG.MOVIE_NOTIFY_ON_PAUSE), - "music_notify_on_pause": checked(plexpy.CONFIG.MUSIC_NOTIFY_ON_PAUSE), - "monitoring_interval": plexpy.CONFIG.MONITORING_INTERVAL, - "refresh_users_interval": plexpy.CONFIG.REFRESH_USERS_INTERVAL, - "refresh_users_on_startup": checked(plexpy.CONFIG.REFRESH_USERS_ON_STARTUP), - "ip_logging_enable": checked(plexpy.CONFIG.IP_LOGGING_ENABLE), - "video_logging_enable": checked(plexpy.CONFIG.VIDEO_LOGGING_ENABLE), - "music_logging_enable": checked(plexpy.CONFIG.MUSIC_LOGGING_ENABLE), - "logging_ignore_interval": plexpy.CONFIG.LOGGING_IGNORE_INTERVAL, - "pms_is_remote": checked(plexpy.CONFIG.PMS_IS_REMOTE) - } - - return serve_template(templatename="config.html", title="Settings", config=config) - @cherrypy.expose def settings(self): interface_dir = os.path.join(plexpy.PROG_DIR, 'data/interfaces/') @@ -562,7 +454,7 @@ class WebInterface(object): # Refresh users table. Probably shouldn't do this on every config save, will improve this later. threading.Thread(target=plextv.refresh_users).start() - raise cherrypy.HTTPRedirect("config") + raise cherrypy.HTTPRedirect("settings") @cherrypy.expose def set_notification_config(self, **kwargs):