mirror of
https://github.com/StuffAnThings/qbit_manage.git
synced 2025-09-13 08:34:51 +08:00
commit
465e922589
3 changed files with 14 additions and 13 deletions
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
3.4.2
|
||||
3.4.3
|
||||
|
|
|
@ -288,17 +288,18 @@ def nohardlink(file, notify):
|
|||
)
|
||||
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}")
|
||||
for x in sorted_files:
|
||||
file_size = os.stat(x).st_size
|
||||
file_no_hardlinks = os.stat(x).st_nlink
|
||||
logger.trace(f"Checking file: {file}")
|
||||
logger.trace(f"Checking file size: {file_size}")
|
||||
logger.trace(f"Checking no of hard links: {file_no_hardlinks}")
|
||||
if file_no_hardlinks > 1 and file_size >= (largest_file_size * threshold):
|
||||
check = False
|
||||
else:
|
||||
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}")
|
||||
for x in sorted_files:
|
||||
file_size = os.stat(x).st_size
|
||||
file_no_hardlinks = os.stat(x).st_nlink
|
||||
logger.trace(f"Checking file: {file}")
|
||||
logger.trace(f"Checking file size: {file_size}")
|
||||
logger.trace(f"Checking no of hard links: {file_no_hardlinks}")
|
||||
if file_no_hardlinks > 1 and file_size >= (largest_file_size * threshold):
|
||||
check = False
|
||||
return check
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
flake8==6.0.0
|
||||
pre-commit==2.20.0
|
||||
qbittorrent-api==2022.11.40
|
||||
qbittorrent-api==2023.2.42
|
||||
requests==2.28.1
|
||||
retrying==1.3.4
|
||||
ruamel.yaml==0.17.21
|
||||
|
|
Loading…
Add table
Reference in a new issue