mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-30 19:40:08 -07:00
Add auto update for Windows exe install
This commit is contained in:
parent
dea51e32a5
commit
60f13df992
3 changed files with 12 additions and 4 deletions
|
@ -61,7 +61,7 @@
|
||||||
Update your Docker container or <a href="#" id="updateDismiss">Dismiss</a>
|
Update your Docker container or <a href="#" id="updateDismiss">Dismiss</a>
|
||||||
% elif plexpy.INSTALL_TYPE == 'snap':
|
% elif plexpy.INSTALL_TYPE == 'snap':
|
||||||
Update your Snap package or <a href="#" id="updateDismiss">Dismiss</a>
|
Update your Snap package or <a href="#" id="updateDismiss">Dismiss</a>
|
||||||
% elif plexpy.INSTALL_TYPE in ('windows', 'macos'):
|
% elif plexpy.INSTALL_TYPE == 'macos':
|
||||||
<a href="${anon_url('https://github.com/%s/%s/releases/tag/%s' % (plexpy.CONFIG.GIT_USER, plexpy.CONFIG.GIT_REPO, plexpy.LATEST_RELEASE))}" target="_blank" rel="noreferrer">Download</a> and install the latest version or <a href="#" id="updateDismiss">Dismiss</a>
|
<a href="${anon_url('https://github.com/%s/%s/releases/tag/%s' % (plexpy.CONFIG.GIT_USER, plexpy.CONFIG.GIT_REPO, plexpy.LATEST_RELEASE))}" target="_blank" rel="noreferrer">Download</a> and install the latest version or <a href="#" id="updateDismiss">Dismiss</a>
|
||||||
% else:
|
% else:
|
||||||
<a href="update">Update</a> or <a href="#" id="updateDismiss">Dismiss</a>
|
<a href="update">Update</a> or <a href="#" id="updateDismiss">Dismiss</a>
|
||||||
|
@ -341,7 +341,7 @@ ${next.modalIncludes()}
|
||||||
msg += 'Update your Docker container or <a href="#" id="updateDismiss">Dismiss</a>';
|
msg += 'Update your Docker container or <a href="#" id="updateDismiss">Dismiss</a>';
|
||||||
} else if (result.install_type === 'snap') {
|
} else if (result.install_type === 'snap') {
|
||||||
msg += 'Update your Snap package or <a href="#" id="updateDismiss">Dismiss</a>';
|
msg += 'Update your Snap package or <a href="#" id="updateDismiss">Dismiss</a>';
|
||||||
} else if (result.install_type === 'windows' || result.install_type === 'macos') {
|
} else if (result.install_type === 'macos') {
|
||||||
msg += '<a href="' + result.release_url + '" target="_blank" rel="noreferrer">Download</a> and install the latest version or <a href="#" id="updateDismiss">Dismiss</a>'
|
msg += '<a href="' + result.release_url + '" target="_blank" rel="noreferrer">Download</a> and install the latest version or <a href="#" id="updateDismiss">Dismiss</a>'
|
||||||
} else {
|
} else {
|
||||||
msg += '<a href="update">Update</a> or <a href="#" id="updateDismiss">Dismiss</a>';
|
msg += '<a href="update">Update</a> or <a href="#" id="updateDismiss">Dismiss</a>';
|
||||||
|
|
|
@ -220,7 +220,7 @@
|
||||||
<p class="help-block">Check for Tautulli updates periodically.</p>
|
<p class="help-block">Check for Tautulli updates periodically.</p>
|
||||||
</div>
|
</div>
|
||||||
<div id="git_update_options">
|
<div id="git_update_options">
|
||||||
% if not plexpy.SNAP and not plexpy.FROZEN:
|
% if not plexpy.SNAP and not (plexpy.FROZEN and common.PLATFORM == 'Darwin'):
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
<label>
|
<label>
|
||||||
<input type="checkbox" id="plexpy_auto_update" name="plexpy_auto_update" value="1" ${config['plexpy_auto_update']} ${docker_setting}> Update Automatically ${docker_msg | n}
|
<input type="checkbox" id="plexpy_auto_update" name="plexpy_auto_update" value="1" ${config['plexpy_auto_update']} ${docker_setting}> Update Automatically ${docker_msg | n}
|
||||||
|
|
|
@ -277,6 +277,10 @@ def check_github(scheduler=False, notify=False, use_cache=False):
|
||||||
if plexpy.PYTHON2:
|
if plexpy.PYTHON2:
|
||||||
logger.warn('Tautulli is running using Python 2. Unable to run automatic update.')
|
logger.warn('Tautulli is running using Python 2. Unable to run automatic update.')
|
||||||
|
|
||||||
|
elif scheduler and plexpy.FROZEN and common.PLATFORM == 'Windows':
|
||||||
|
logger.info('Running automatic update.')
|
||||||
|
plexpy.shutdown(update=True)
|
||||||
|
|
||||||
elif scheduler and plexpy.CONFIG.PLEXPY_AUTO_UPDATE and \
|
elif scheduler and plexpy.CONFIG.PLEXPY_AUTO_UPDATE and \
|
||||||
not plexpy.DOCKER and not plexpy.SNAP and not plexpy.FROZEN:
|
not plexpy.DOCKER and not plexpy.SNAP and not plexpy.FROZEN:
|
||||||
logger.info('Running automatic update.')
|
logger.info('Running automatic update.')
|
||||||
|
@ -296,9 +300,13 @@ def update():
|
||||||
if not plexpy.UPDATE_AVAILABLE:
|
if not plexpy.UPDATE_AVAILABLE:
|
||||||
return
|
return
|
||||||
|
|
||||||
if plexpy.INSTALL_TYPE in ('docker', 'snap', 'windows', 'macos'):
|
if plexpy.INSTALL_TYPE in ('docker', 'snap', 'macos'):
|
||||||
return
|
return
|
||||||
|
|
||||||
|
elif plexpy.INSTALL_TYPE == 'windows':
|
||||||
|
logger.info('Calling Windows scheduled task to update Tautulli')
|
||||||
|
subprocess.Popen(['SCHTASKS', '/Run', '/TN', 'TautulliUpdateTask'])
|
||||||
|
|
||||||
elif plexpy.INSTALL_TYPE == 'git':
|
elif plexpy.INSTALL_TYPE == 'git':
|
||||||
output, err = runGit('pull --ff-only {} {}'.format(plexpy.CONFIG.GIT_REMOTE,
|
output, err = runGit('pull --ff-only {} {}'.format(plexpy.CONFIG.GIT_REMOTE,
|
||||||
plexpy.CONFIG.GIT_BRANCH))
|
plexpy.CONFIG.GIT_BRANCH))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue