From 7f0cdb6f2622b98113f5042caf3e8665cf5d22bc Mon Sep 17 00:00:00 2001 From: Anthony Biacco Date: Wed, 12 Dec 2018 10:18:11 -0700 Subject: [PATCH 1/8] add config variable PMS_UPDATE_NOTIFY_INTERVAL and settings interface to be to change how often we notify about a new plex version --- data/interfaces/default/settings.html | 10 ++++++++++ plexpy/__init__.py | 3 ++- plexpy/config.py | 1 + plexpy/webserve.py | 2 ++ 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/data/interfaces/default/settings.html b/data/interfaces/default/settings.html index 4e5bc1f0..b87600cb 100644 --- a/data/interfaces/default/settings.html +++ b/data/interfaces/default/settings.html @@ -813,6 +813,16 @@ +
+
+ + +
+ +
+

+ The interval (in hours) Tautulli will notify about a new Plex Media Server version. Minimum 1, maximum 999, default 24. +

diff --git a/plexpy/__init__.py b/plexpy/__init__.py index fd2d40b3..a78f343f 100644 --- a/plexpy/__init__.py +++ b/plexpy/__init__.py @@ -429,6 +429,7 @@ def initialize_scheduler(): # Update check github_minutes = CONFIG.CHECK_GITHUB_INTERVAL if CONFIG.CHECK_GITHUB_INTERVAL and CONFIG.CHECK_GITHUB else 0 + pms_update_notify_hours = CONFIG.PMS_UPDATE_NOTIFY_INTERVAL if 1 <= CONFIG.PMS_UPDATE_NOTIFY_INTERVAL <= 999 else 24 schedule_job(versioncheck.check_update, 'Check GitHub for updates', hours=0, minutes=github_minutes, seconds=0, args=(bool(CONFIG.PLEXPY_AUTO_UPDATE), True)) @@ -447,7 +448,7 @@ def initialize_scheduler(): schedule_job(activity_pinger.check_server_access, 'Check for Plex remote access', hours=0, minutes=0, seconds=60 * bool(CONFIG.MONITOR_REMOTE_ACCESS)) schedule_job(activity_pinger.check_server_updates, 'Check for Plex updates', - hours=12 * bool(CONFIG.MONITOR_PMS_UPDATES), minutes=0, seconds=0) + hours=pms_update_notify_hours * bool(CONFIG.MONITOR_PMS_UPDATES), minutes=0, seconds=0) # Refresh the users list and libraries list user_hours = CONFIG.REFRESH_USERS_INTERVAL if 1 <= CONFIG.REFRESH_USERS_INTERVAL <= 24 else 12 diff --git a/plexpy/config.py b/plexpy/config.py index 8b9d92db..c45055f3 100644 --- a/plexpy/config.py +++ b/plexpy/config.py @@ -66,6 +66,7 @@ _CONFIG_DEFINITIONS = { 'PMS_UPDATE_DISTRO': (str, 'PMS', ''), 'PMS_UPDATE_DISTRO_BUILD': (str, 'PMS', ''), 'PMS_WEB_URL': (str, 'PMS', 'https://app.plex.tv/desktop'), + 'PMS_UPDATE_NOTIFY_INTERVAL': (int, 'Advanced', 24), 'TIME_FORMAT': (str, 'General', 'HH:mm'), 'ANON_REDIRECT': (str, 'General', 'http://www.nullrefer.com/?'), 'API_ENABLED': (int, 'General', 1), diff --git a/plexpy/webserve.py b/plexpy/webserve.py index 452f68fb..d2e58b44 100644 --- a/plexpy/webserve.py +++ b/plexpy/webserve.py @@ -2755,6 +2755,7 @@ class WebInterface(object): "pms_uuid": plexpy.CONFIG.PMS_UUID, "pms_web_url": plexpy.CONFIG.PMS_WEB_URL, "pms_name": plexpy.CONFIG.PMS_NAME, + "pms_update_notify_interval": plexpy.CONFIG.PMS_UPDATE_NOTIFY_INTERVAL, "date_format": plexpy.CONFIG.DATE_FORMAT, "time_format": plexpy.CONFIG.TIME_FORMAT, "week_start_monday": checked(plexpy.CONFIG.WEEK_START_MONDAY), @@ -2877,6 +2878,7 @@ class WebInterface(object): if kwargs.get('check_github') != plexpy.CONFIG.CHECK_GITHUB or \ kwargs.get('refresh_libraries_interval') != str(plexpy.CONFIG.REFRESH_LIBRARIES_INTERVAL) or \ kwargs.get('refresh_users_interval') != str(plexpy.CONFIG.REFRESH_USERS_INTERVAL) or \ + kwargs.get('pms_update_notify_interval') != str(plexpy.CONFIG.PMS_UPDATE_NOTIFY_INTERVAL) or \ kwargs.get('monitor_pms_updates') != plexpy.CONFIG.MONITOR_PMS_UPDATES or \ kwargs.get('monitor_remote_access') != plexpy.CONFIG.MONITOR_REMOTE_ACCESS or \ kwargs.get('pms_url_manual') != plexpy.CONFIG.PMS_URL_MANUAL: From b92b057ab91c8a5e6c5330dd617cd521cdb6a796 Mon Sep 17 00:00:00 2001 From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> Date: Mon, 15 Apr 2019 13:06:02 -0600 Subject: [PATCH 2/8] Update data/interfaces/default/settings.html Co-Authored-By: abiacco --- data/interfaces/default/settings.html | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/data/interfaces/default/settings.html b/data/interfaces/default/settings.html index b87600cb..9ef88775 100644 --- a/data/interfaces/default/settings.html +++ b/data/interfaces/default/settings.html @@ -813,7 +813,18 @@
+ +
+
+
+ +
+ +
+

+ The interval (in hours) Tautulli will check for a new Plex Media Server update. Minimum 1, default 24. +

From 75949a8dd2bf3b03163f1957c1f4b269b516509c Mon Sep 17 00:00:00 2001 From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> Date: Mon, 15 Apr 2019 13:07:07 -0600 Subject: [PATCH 3/8] Update plexpy/__init__.py Co-Authored-By: abiacco --- plexpy/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plexpy/__init__.py b/plexpy/__init__.py index a78f343f..2713ad61 100644 --- a/plexpy/__init__.py +++ b/plexpy/__init__.py @@ -429,7 +429,7 @@ def initialize_scheduler(): # Update check github_minutes = CONFIG.CHECK_GITHUB_INTERVAL if CONFIG.CHECK_GITHUB_INTERVAL and CONFIG.CHECK_GITHUB else 0 - pms_update_notify_hours = CONFIG.PMS_UPDATE_NOTIFY_INTERVAL if 1 <= CONFIG.PMS_UPDATE_NOTIFY_INTERVAL <= 999 else 24 + pms_update_check_hours = CONFIG.PMS_UPDATE_CHECK_INTERVAL if 1 <= CONFIG.PMS_UPDATE_CHECK_INTERVAL else 24 schedule_job(versioncheck.check_update, 'Check GitHub for updates', hours=0, minutes=github_minutes, seconds=0, args=(bool(CONFIG.PLEXPY_AUTO_UPDATE), True)) From 9a6106f10eced724ce17965bfe7f2c3e50f22494 Mon Sep 17 00:00:00 2001 From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> Date: Mon, 15 Apr 2019 13:07:14 -0600 Subject: [PATCH 4/8] Update plexpy/config.py Co-Authored-By: abiacco --- plexpy/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plexpy/config.py b/plexpy/config.py index c45055f3..08dea996 100644 --- a/plexpy/config.py +++ b/plexpy/config.py @@ -66,7 +66,7 @@ _CONFIG_DEFINITIONS = { 'PMS_UPDATE_DISTRO': (str, 'PMS', ''), 'PMS_UPDATE_DISTRO_BUILD': (str, 'PMS', ''), 'PMS_WEB_URL': (str, 'PMS', 'https://app.plex.tv/desktop'), - 'PMS_UPDATE_NOTIFY_INTERVAL': (int, 'Advanced', 24), + 'PMS_UPDATE_CHECK_INTERVAL': (int, 'Advanced', 24), 'TIME_FORMAT': (str, 'General', 'HH:mm'), 'ANON_REDIRECT': (str, 'General', 'http://www.nullrefer.com/?'), 'API_ENABLED': (int, 'General', 1), From beabd7bb0f075e87ae38be3f00391244dff38df3 Mon Sep 17 00:00:00 2001 From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> Date: Mon, 15 Apr 2019 13:07:34 -0600 Subject: [PATCH 5/8] Update plexpy/__init__.py Co-Authored-By: abiacco --- plexpy/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plexpy/__init__.py b/plexpy/__init__.py index 2713ad61..9036f681 100644 --- a/plexpy/__init__.py +++ b/plexpy/__init__.py @@ -448,7 +448,7 @@ def initialize_scheduler(): schedule_job(activity_pinger.check_server_access, 'Check for Plex remote access', hours=0, minutes=0, seconds=60 * bool(CONFIG.MONITOR_REMOTE_ACCESS)) schedule_job(activity_pinger.check_server_updates, 'Check for Plex updates', - hours=pms_update_notify_hours * bool(CONFIG.MONITOR_PMS_UPDATES), minutes=0, seconds=0) + hours=pms_update_check_hours * bool(CONFIG.MONITOR_PMS_UPDATES), minutes=0, seconds=0) # Refresh the users list and libraries list user_hours = CONFIG.REFRESH_USERS_INTERVAL if 1 <= CONFIG.REFRESH_USERS_INTERVAL <= 24 else 12 From 74c07167e15f5a485d831375af5ecc8e88f7a716 Mon Sep 17 00:00:00 2001 From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> Date: Mon, 15 Apr 2019 13:07:46 -0600 Subject: [PATCH 6/8] Update plexpy/webserve.py Co-Authored-By: abiacco --- plexpy/webserve.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plexpy/webserve.py b/plexpy/webserve.py index d2e58b44..490428f0 100644 --- a/plexpy/webserve.py +++ b/plexpy/webserve.py @@ -2878,7 +2878,7 @@ class WebInterface(object): if kwargs.get('check_github') != plexpy.CONFIG.CHECK_GITHUB or \ kwargs.get('refresh_libraries_interval') != str(plexpy.CONFIG.REFRESH_LIBRARIES_INTERVAL) or \ kwargs.get('refresh_users_interval') != str(plexpy.CONFIG.REFRESH_USERS_INTERVAL) or \ - kwargs.get('pms_update_notify_interval') != str(plexpy.CONFIG.PMS_UPDATE_NOTIFY_INTERVAL) or \ + kwargs.get('pms_update_check_interval') != str(plexpy.CONFIG.PMS_UPDATE_CHECK_INTERVAL) or \ kwargs.get('monitor_pms_updates') != plexpy.CONFIG.MONITOR_PMS_UPDATES or \ kwargs.get('monitor_remote_access') != plexpy.CONFIG.MONITOR_REMOTE_ACCESS or \ kwargs.get('pms_url_manual') != plexpy.CONFIG.PMS_URL_MANUAL: From fc457585fb4334db9c2df1296ae649899ac6707e Mon Sep 17 00:00:00 2001 From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> Date: Mon, 15 Apr 2019 13:08:04 -0600 Subject: [PATCH 7/8] Update plexpy/webserve.py Co-Authored-By: abiacco --- plexpy/webserve.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plexpy/webserve.py b/plexpy/webserve.py index 490428f0..bcba822d 100644 --- a/plexpy/webserve.py +++ b/plexpy/webserve.py @@ -2755,7 +2755,7 @@ class WebInterface(object): "pms_uuid": plexpy.CONFIG.PMS_UUID, "pms_web_url": plexpy.CONFIG.PMS_WEB_URL, "pms_name": plexpy.CONFIG.PMS_NAME, - "pms_update_notify_interval": plexpy.CONFIG.PMS_UPDATE_NOTIFY_INTERVAL, + "pms_update_check_interval": plexpy.CONFIG.PMS_UPDATE_CHECK_INTERVAL, "date_format": plexpy.CONFIG.DATE_FORMAT, "time_format": plexpy.CONFIG.TIME_FORMAT, "week_start_monday": checked(plexpy.CONFIG.WEEK_START_MONDAY), From b8d4bb7d69242257ac41bc5eb58910d856b8c42b Mon Sep 17 00:00:00 2001 From: Anthony Biacco Date: Mon, 15 Apr 2019 13:45:32 -0600 Subject: [PATCH 8/8] remove old notify_interval block --- data/interfaces/default/settings.html | 9 --------- 1 file changed, 9 deletions(-) diff --git a/data/interfaces/default/settings.html b/data/interfaces/default/settings.html index 9ef88775..ddcf20fe 100644 --- a/data/interfaces/default/settings.html +++ b/data/interfaces/default/settings.html @@ -825,15 +825,6 @@

The interval (in hours) Tautulli will check for a new Plex Media Server update. Minimum 1, default 24.

-
- - -
- -
-

- The interval (in hours) Tautulli will notify about a new Plex Media Server version. Minimum 1, maximum 999, default 24. -