Expose Tautulli update check interval setting

This commit is contained in:
JonnyWong16 2021-05-16 16:30:49 -07:00
parent 28439b5042
commit cf0cc36b15
2 changed files with 17 additions and 3 deletions

View file

@ -215,11 +215,23 @@
<div class="checkbox">
<label>
<input type="checkbox" id="check_github" name="check_github" value="1" ${config['check_github']}> Enable Updates
<input type="checkbox" id="check_github" name="check_github" value="1" ${config['check_github']}> Check for Tautulli Updates
</label>
<p class="help-block">Check for Tautulli updates periodically.</p>
<p class="help-block">Enable to check for Tautulli updates.</p>
</div>
<div id="git_update_options">
<div class="form-group">
<label for="check_github_interval">Update Check Interval</label>
<div class="row">
<div class="col-md-2">
<input type="text" class="form-control" data-parsley-type="integer" id="check_github_interval" name="check_github_interval" value="${config['check_github_interval']}" size="3" data-parsley-min="1" data-parsley-trigger="change" data-parsley-errors-container="#check_github_interval_error" required>
</div>
<div id="check_github_interval_error" class="alert alert-danger settings-alert" role="alert"></div>
</div>
<p class="help-block">
The interval (in hours) Tautulli will check for a new update. Minimum 1, default 6.
</p>
</div>
% if not plexpy.SNAP and not plexpy.FROZEN:
<div class="checkbox">
<label>
@ -889,7 +901,7 @@
</div>
</div>
<div class="form-group">
<label for="pms_update_check_interval">Update Check Interval</label>
<label for="pms_update_check_interval">Plex Update Check Interval</label>
<div class="row">
<div class="col-md-2">
<input type="text" class="form-control" data-parsley-type="integer" id="pms_update_check_interval" name="pms_update_check_interval" value="${config['pms_update_check_interval']}" size="3" data-parsley-min="1" data-parsley-trigger="change" data-parsley-errors-container="#pms_update_check_interval_error" required>

View file

@ -3165,6 +3165,7 @@ class WebInterface(object):
"log_dir": plexpy.CONFIG.LOG_DIR,
"log_blacklist": checked(plexpy.CONFIG.LOG_BLACKLIST),
"check_github": checked(plexpy.CONFIG.CHECK_GITHUB),
"check_github_interval": plexpy.CONFIG.CHECK_GITHUB_INTERVAL,
"interface_list": interface_list,
"cache_sizemb": plexpy.CONFIG.CACHE_SIZEMB,
"pms_identifier": plexpy.CONFIG.PMS_IDENTIFIER,
@ -3319,6 +3320,7 @@ class WebInterface(object):
# If we change any monitoring settings, make sure we reschedule tasks.
if kwargs.get('check_github') != plexpy.CONFIG.CHECK_GITHUB or \
kwargs.get('check_github_interval') != str(plexpy.CONFIG.CHECK_GITHUB_INTERVAL) 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_check_interval') != str(plexpy.CONFIG.PMS_UPDATE_CHECK_INTERVAL) or \