mirror of
https://github.com/StuffAnThings/qbit_manage.git
synced 2024-11-10 17:47:13 +08:00
Merge branch 'master' of https://github.com/StuffAnThings/qbit_manage into develop
* 'master' of https://github.com/StuffAnThings/qbit_manage: [pre-commit.ci] pre-commit autoupdate send notification on nohardlink warning and remove force failure 3.4.2 Fixes #196 refactor noHL better logging for FileNotFoundError removes alive-progress dependency causing issues with rolling logs found. Once this is fixed then it can be implemented again https://github.com/rsalmei/alive-progress/issues/104 better error handling for noHL fixes noHL bug with remote not being replaced better trace for nohardlink better error checking in commands minor bug fix in torrent tagging bug fix on prev refactor bit a refactoring Fixes #192 Fixes noHL logic with false negatives not being caught with small files. 3.4.1
This commit is contained in:
commit
fd18d54783
3 changed files with 7 additions and 6 deletions
|
@ -36,12 +36,12 @@ repos:
|
|||
hooks:
|
||||
- id: reorder-python-imports
|
||||
- repo: https://github.com/asottile/pyupgrade
|
||||
rev: v3.3.0
|
||||
rev: v3.3.1
|
||||
hooks:
|
||||
- id: pyupgrade
|
||||
args: [--py3-plus]
|
||||
- repo: https://github.com/psf/black
|
||||
rev: 22.10.0
|
||||
rev: 22.12.0
|
||||
hooks:
|
||||
- id: black
|
||||
language_version: python3
|
||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
3.4.1
|
||||
3.4.2
|
||||
|
|
|
@ -270,7 +270,7 @@ def remove_empty_directories(pathlib_root_dir, pattern):
|
|||
# If a folder is passed, it will take the largest file in that folder and only check for hardlinks
|
||||
# of the remaining files where the file is greater size a percentage of the largest file
|
||||
# This fixes the bug in #192
|
||||
def nohardlink(file):
|
||||
def nohardlink(file, notify):
|
||||
check = True
|
||||
if os.path.isfile(file):
|
||||
logger.trace(f"Checking file: {file}")
|
||||
|
@ -284,9 +284,10 @@ def nohardlink(file):
|
|||
if not sorted_files:
|
||||
msg = (
|
||||
f"Nohardlink Error: Unable to open the folder {file}. "
|
||||
"Please make sure qbit_manage has access to this directory."
|
||||
"Please make sure folder exists and qbit_manage has access to this directory."
|
||||
)
|
||||
raise Failed(msg)
|
||||
notify(msg, "nohardlink")
|
||||
logger.warning(msg)
|
||||
largest_file_size = os.stat(sorted_files[0]).st_size
|
||||
logger.trace(f"Largest file: {sorted_files[0]}")
|
||||
logger.trace(f"Largest file size: {largest_file_size}")
|
||||
|
|
Loading…
Reference in a new issue