From 38c9c5a6ea4e6849caf3694dd02e08ed302a4bbb Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Sun, 14 Feb 2016 17:51:14 -0800 Subject: [PATCH] Add configuration and scheduler info to settings page --- data/interfaces/default/css/plexpy.css | 29 +++++ data/interfaces/default/settings.html | 143 ++++++++++++++++++++++++- plexpy/__init__.py | 27 +++-- plexpy/common.py | 12 ++- plexpy/config.py | 2 + plexpy/database.py | 2 +- plexpy/helpers.py | 7 ++ plexpy/webserve.py | 1 + 8 files changed, 205 insertions(+), 18 deletions(-) diff --git a/data/interfaces/default/css/plexpy.css b/data/interfaces/default/css/plexpy.css index a9a6f36e..d4862b84 100644 --- a/data/interfaces/default/css/plexpy.css +++ b/data/interfaces/default/css/plexpy.css @@ -2722,4 +2722,33 @@ table[id^='media_info_child'] table[id^='media_info_child'] thead th { .small-muted { font-size: small; color: #777; +} +.config-info-table, +.config-scheduler-table { + width: 100% +} +.config-info-table td, +.config-info-table th, +.config-scheduler-table td, +.config-scheduler-table th { + padding-bottom: 5px; +} +.config-info-table td:first-child { + width: 150px; +} +.config-scheduler-table td:first-child { + width: 225px; +} +.config-scheduler-table th { + color: #fff; +} +a.no-highlight { + color: #777; +} +a.no-highlight:hover { + color: #fff; +} +.top-line { + border-top: 1px dotted #777; + padding-top: 5px; } \ No newline at end of file diff --git a/data/interfaces/default/settings.html b/data/interfaces/default/settings.html index 5b2d5732..33f6b94b 100644 --- a/data/interfaces/default/settings.html +++ b/data/interfaces/default/settings.html @@ -1,9 +1,14 @@ <%inherit file="base.html"/> <%! +import arrow +import sys import plexpy from plexpy import notifiers, common, versioncheck +from plexpy.helpers import anon_url available_notification_agents = sorted(notifiers.available_notification_agents(), key=lambda k: k['name']) + +scheduled_jobs = [j.id for j in plexpy.SCHED.get_jobs()] %> <%def name="headIncludes()"> @@ -33,7 +38,8 @@ available_notification_agents = sorted(notifiers.available_notification_agents()