diff --git a/plexpy/config.py b/plexpy/config.py index 10308c22..02db43a9 100644 --- a/plexpy/config.py +++ b/plexpy/config.py @@ -289,6 +289,7 @@ _CONFIG_DEFINITIONS = { 'LOG_BLACKLIST': (int, 'General', 1), 'LOG_DIR': (str, 'General', ''), 'LOGGING_IGNORE_INTERVAL': (int, 'Monitoring', 120), + 'METADATA_CACHE_SECONDS': (int, 'Advanced', 1800), 'MOVIE_LOGGING_ENABLE': (int, 'Monitoring', 1), 'MOVIE_NOTIFY_ENABLE': (int, 'Monitoring', 0), 'MOVIE_NOTIFY_ON_START': (int, 'Monitoring', 1), diff --git a/plexpy/notification_handler.py b/plexpy/notification_handler.py index baa1df59..91d297e4 100644 --- a/plexpy/notification_handler.py +++ b/plexpy/notification_handler.py @@ -266,7 +266,7 @@ def notify_custom_conditions(notifier_id=None, parameters=None): elif parameter_type == 'float': parameter_value = float(parameter_value) - + except ValueError as e: logger.error(u"Tautulli NotificationHandler :: Unable to cast parameter '%s', value '%s', to type '%s'." % (parameter, parameter_value, parameter_type)) diff --git a/plexpy/pmsconnect.py b/plexpy/pmsconnect.py index 853f216b..390f918f 100644 --- a/plexpy/pmsconnect.py +++ b/plexpy/pmsconnect.py @@ -543,7 +543,7 @@ class PmsConnect(object): if metadata: _cache_time = metadata.pop('_cache_time', 0) # Return cached metadata if less than 30 minutes ago - if int(time.time()) - _cache_time <= 1800: + if int(time.time()) - _cache_time <= plexpy.CONFIG.METADATA_CACHE_SECONDS: return metadata if rating_key: