1
0
Fork 0
mirror of https://github.com/morpheus65535/bazarr synced 2024-12-23 08:13:14 +00:00

Fixed upgrade process to properly use bazarr.zip asset #1379

This commit is contained in:
morpheus65535 2021-04-15 16:37:53 -04:00
parent 99fc282b07
commit b02e0ec7ec

View file

@ -121,7 +121,9 @@ def apply_update():
logging.debug('BAZARR is trying to unzip this release to {0}: {1}'.format(bazarr_dir, bazarr_zip))
try:
with ZipFile(bazarr_zip, 'r') as archive:
zip_root_directory = archive.namelist()[0]
zip_root_directory = ''
if len({item.split('/')[0] for item in archive.namelist()}) == 1:
zip_root_directory = archive.namelist()[0]
if os.path.isdir(build_dir):
try: