Skip to content

Commit

Permalink
Fixed compression type for backup. #2278
Browse files Browse the repository at this point in the history
  • Loading branch information
morpheus65535 committed Oct 25, 2023
1 parent 5234565 commit 54f9570
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bazarr/utilities/backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import logging

from datetime import datetime, timedelta
from zipfile import ZipFile, BadZipFile
from zipfile import ZipFile, BadZipFile, ZIP_DEFLATED
from glob import glob

from app.get_args import args
Expand Down Expand Up @@ -74,7 +74,8 @@ def backup_to_zip():
config_file = os.path.join(args.config_dir, 'config', 'config.yaml')
logging.debug(f'Config file path to backup is: {config_file}')

with ZipFile(os.path.join(get_backup_path(), backup_filename), 'w', compression=ZIP_DEFLATED, compresslevel=9) as backupZip:
with ZipFile(os.path.join(get_backup_path(), backup_filename), 'w', compression=ZIP_DEFLATED,
compresslevel=9) as backupZip:
if database_backup_file:
backupZip.write(database_backup_file, 'bazarr.db')
try:
Expand Down

0 comments on commit 54f9570

Please sign in to comment.