mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-12 16:22:57 -07:00
Update message to show release instead of commits for master and beta
This commit is contained in:
parent
d473bb3058
commit
cbcdac5b04
5 changed files with 45 additions and 14 deletions
|
@ -85,6 +85,7 @@ CURRENT_VERSION = None
|
|||
LATEST_VERSION = None
|
||||
COMMITS_BEHIND = None
|
||||
PREV_RELEASE = None
|
||||
LATEST_RELEASE = None
|
||||
|
||||
UMASK = None
|
||||
|
||||
|
|
|
@ -907,6 +907,7 @@ def build_server_notify_params(notify_action=None, **kwargs):
|
|||
'update_changelog_fixed': pms_download_info['changelog_fixed'],
|
||||
# Tautulli update parameters
|
||||
'tautulli_update_version': plexpy_download_info['tag_name'],
|
||||
'tautulli_update_release_url': plexpy_download_info['html_url'],
|
||||
'tautulli_update_tar': plexpy_download_info['tarball_url'],
|
||||
'tautulli_update_zip': plexpy_download_info['zipball_url'],
|
||||
'tautulli_update_commit': kwargs.pop('plexpy_update_commit', ''),
|
||||
|
|
|
@ -196,6 +196,8 @@ def checkGithub(auto_update=False):
|
|||
else:
|
||||
release = releases[0]
|
||||
|
||||
plexpy.LATEST_RELEASE = release['tag_name']
|
||||
|
||||
plexpy.NOTIFY_QUEUE.put({'notify_action': 'on_plexpyupdate', 'plexpy_download_info': release,
|
||||
'plexpy_update_commit': plexpy.LATEST_VERSION, 'plexpy_update_behind': plexpy.COMMITS_BEHIND})
|
||||
|
||||
|
|
|
@ -3543,14 +3543,30 @@ class WebInterface(object):
|
|||
|
||||
if not plexpy.CURRENT_VERSION:
|
||||
return {'result': 'error',
|
||||
'message': 'You are running an unknown version of Tautulli.',
|
||||
'update': None}
|
||||
'update': None,
|
||||
'message': 'You are running an unknown version of Tautulli.'
|
||||
}
|
||||
|
||||
elif plexpy.CURRENT_VERSION != plexpy.LATEST_VERSION and \
|
||||
plexpy.COMMITS_BEHIND > 0 and plexpy.INSTALL_TYPE != 'win':
|
||||
elif plexpy.COMMITS_BEHIND > 0 and plexpy.common.BRANCH in ('master', 'beta') and \
|
||||
plexpy.common.VERSION_NUMBER != plexpy.LATEST_RELEASE:
|
||||
return {'result': 'success',
|
||||
'update': True,
|
||||
'message': 'An update for Tautulli is available.',
|
||||
'release': True,
|
||||
'message': 'A new release (%) of Tautulli is available.' % plexpy.LATEST_RELEASE,
|
||||
'latest_release': plexpy.LATEST_RELEASE,
|
||||
'release_url': helpers.anon_url(
|
||||
'https://github.com/%s/%s/releases/tag/%s'
|
||||
% (plexpy.CONFIG.GIT_USER,
|
||||
plexpy.CONFIG.GIT_REPO,
|
||||
plexpy.LATEST_RELEASE))
|
||||
}
|
||||
|
||||
elif plexpy.COMMITS_BEHIND > 0 and plexpy.CURRENT_VERSION != plexpy.LATEST_VERSION and \
|
||||
plexpy.INSTALL_TYPE != 'win':
|
||||
return {'result': 'success',
|
||||
'update': True,
|
||||
'release': False,
|
||||
'message': 'A newer version of Tautulli is available.',
|
||||
'latest_version': plexpy.LATEST_VERSION,
|
||||
'commits_behind': plexpy.COMMITS_BEHIND,
|
||||
'compare_url': helpers.anon_url(
|
||||
|
@ -3564,7 +3580,8 @@ class WebInterface(object):
|
|||
else:
|
||||
return {'result': 'success',
|
||||
'update': False,
|
||||
'message': 'Tautulli is up to date.'}
|
||||
'message': 'Tautulli is up to date.'
|
||||
}
|
||||
|
||||
@cherrypy.expose
|
||||
@requireAuth(member_of("admin"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue