mirror of
https://github.com/morpheus65535/bazarr.git
synced 2025-02-24 14:57:16 +08:00
Merge remote-tracking branch 'origin/development' into development
This commit is contained in:
commit
db8e4d43b4
2 changed files with 3 additions and 3 deletions
|
@ -74,7 +74,7 @@ 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') 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:
|
||||
|
|
|
@ -872,14 +872,14 @@ def _search_external_subtitles(path, languages=None, only_one=False, match_stric
|
|||
dirpath, filename = os.path.split(path)
|
||||
dirpath = dirpath or '.'
|
||||
fn_no_ext, fileext = os.path.splitext(filename)
|
||||
fn_no_ext_lower = unicodedata.normalize('NFC', fn_no_ext.lower())
|
||||
fn_no_ext_lower = fn_no_ext.lower() # unicodedata.normalize('NFC', fn_no_ext.lower())
|
||||
subtitles = {}
|
||||
|
||||
for entry in scandir(dirpath):
|
||||
if not entry.is_file(follow_symlinks=False):
|
||||
continue
|
||||
|
||||
p = unicodedata.normalize('NFC', entry.name)
|
||||
p = entry.name # unicodedata.normalize('NFC', entry.name)
|
||||
|
||||
# keep only valid subtitle filenames
|
||||
if not p.lower().endswith(SUBTITLE_EXTENSIONS):
|
||||
|
|
Loading…
Reference in a new issue