aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormorpheus65535 <[email protected]>2021-06-25 19:47:32 -0400
committermorpheus65535 <[email protected]>2021-06-25 19:47:32 -0400
commit4e03ec0acc5d07638ce5424bd68fa44b63e31fdc (patch)
tree699ee2dc97d01c8deab501a617bc030a252f20f0
parentd20fa5d3d04e5ec47d8ffc925d2dc8ac6b1f4167 (diff)
downloadbazarr-4e03ec0acc5d07638ce5424bd68fa44b63e31fdc.tar.gz
bazarr-4e03ec0acc5d07638ce5424bd68fa44b63e31fdc.zip
Fixed the Bazarr update process that was preventing moving back to master branch once you've started to use development/nightly. #1331
-rw-r--r--bazarr/check_update.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/bazarr/check_update.py b/bazarr/check_update.py
index 0db40b247..699342842 100644
--- a/bazarr/check_update.py
+++ b/bazarr/check_update.py
@@ -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: