From 7a37408459e8a6791bb89458845c1ab5a4f4a6a1 Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Sun, 9 Oct 2016 09:27:34 -0700 Subject: [PATCH] Add advanced config for number of notification threads --- plexpy/__init__.py | 2 +- plexpy/config.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/plexpy/__init__.py b/plexpy/__init__.py index c3bb0780..82f7a252 100644 --- a/plexpy/__init__.py +++ b/plexpy/__init__.py @@ -395,7 +395,7 @@ def start(): # Start background notification thread if any([CONFIG.MOVIE_NOTIFY_ENABLE, CONFIG.TV_NOTIFY_ENABLE, CONFIG.MUSIC_NOTIFY_ENABLE, CONFIG.NOTIFY_RECENTLY_ADDED]): - notification_handler.start_threads(num_threads=3) + notification_handler.start_threads(num_threads=CONFIG.NOTIFICATION_THREADS) _STARTED = True diff --git a/plexpy/config.py b/plexpy/config.py index d5fc6197..b35b94d3 100644 --- a/plexpy/config.py +++ b/plexpy/config.py @@ -311,6 +311,7 @@ _CONFIG_DEFINITIONS = { 'NMA_ON_PMSUPDATE': (int, 'NMA', 0), 'NMA_ON_CONCURRENT': (int, 'NMA', 0), 'NMA_ON_NEWDEVICE': (int, 'NMA', 0), + 'NOTIFICATION_THREADS': (int, 'Advanced', 2), 'NOTIFY_CONSECUTIVE': (int, 'Monitoring', 1), 'NOTIFY_GROUP_RECENTLY_ADDED': (int, 'Monitoring', 1), 'NOTIFY_UPLOAD_POSTERS': (int, 'Monitoring', 0),