mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-08 06:00:51 -07:00
Make metadata cache an advanced config option
This commit is contained in:
parent
c67fa480a7
commit
29ab470e42
3 changed files with 3 additions and 2 deletions
|
@ -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),
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue