mirror of
https://github.com/morpheus65535/bazarr
synced 2025-01-22 14:58:38 +00:00
Fixed the Bazarr update process that was preventing moving back to master branch once you've started to use development/nightly. #1331
This commit is contained in:
parent
d20fa5d3d0
commit
4e03ec0acc
1 changed files with 8 additions and 2 deletions
|
@ -68,9 +68,10 @@ def check_if_new_update():
|
|||
if release:
|
||||
logging.debug('BAZARR last release available is {}'.format(release['name']))
|
||||
|
||||
current_version = None
|
||||
try:
|
||||
semver.parse(os.environ["BAZARR_VERSION"])
|
||||
semver.parse(release['name'].lstrip('v'))
|
||||
current_version = semver.VersionInfo.parse(os.environ["BAZARR_VERSION"])
|
||||
semver.VersionInfo.parse(release['name'].lstrip('v'))
|
||||
except ValueError:
|
||||
new_version = True
|
||||
else:
|
||||
|
@ -81,6 +82,11 @@ def check_if_new_update():
|
|||
if new_version and release['name'] != 'v0.9.1.1':
|
||||
logging.debug('BAZARR newer release available and will be downloaded: {}'.format(release['name']))
|
||||
download_release(url=release['download_link'])
|
||||
# rolling back from nightly to stable release
|
||||
elif current_version:
|
||||
if current_version.prerelease and not use_prerelease:
|
||||
logging.debug('BAZARR previous stable version will be downloaded: {}'.format(release['name']))
|
||||
download_release(url=release['download_link'])
|
||||
else:
|
||||
logging.debug('BAZARR no newer release have been found')
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue