mirror of
https://github.com/StuffAnThings/qbit_manage.git
synced 2025-09-09 14:46:51 +08:00
commit
1a5f8b29ba
8 changed files with 42 additions and 23 deletions
|
@ -19,7 +19,7 @@ jobs:
|
|||
# will not occur.
|
||||
- name: Dependabot metadata
|
||||
id: dependabot-metadata
|
||||
uses: dependabot/fetch-metadata@v1.5.0
|
||||
uses: dependabot/fetch-metadata@v1.5.1
|
||||
with:
|
||||
github-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
# Here the PR gets approved.
|
||||
|
|
20
CHANGELOG
20
CHANGELOG
|
@ -1,20 +1,8 @@
|
|||
# Requirements Updated
|
||||
- pre-commit updated to 3.3.3
|
||||
- requests updated to 2.31.0
|
||||
- ruamel.yaml updated to 0.17.26
|
||||
- Adds new dependency bencodepy to generate hash for cross-seed
|
||||
- Adds new dependency GitPython for checking git branches
|
||||
- Updates ruamel.yaml to 0.17.27
|
||||
|
||||
# Bug Fixes
|
||||
- Changes HardLink Logic (Thanks to @ColinHebert for the suggestion) Fixes #291
|
||||
- Additional error checking (Fixes #282)
|
||||
- Fixes #287 (Thanks to @buthed010203 #290)
|
||||
- Fixes Remove Orphan crashing when multiprocessing (Thanks to @buthed010203 #289)
|
||||
- Speed optimization for Remove Orphan (Thanks to @buthed010203 #299)
|
||||
- Fixes Remove Orphan from crashing in Windows (Fixes #275)
|
||||
- Fixes #292
|
||||
- Fixes #201
|
||||
- Fixes #279
|
||||
- Updates Dockerfile to debloat and move to Python 3.11
|
||||
- Fixes #302
|
||||
- Adds a way to bypass qbt version check (unsupported - Thanks to @ftc2 #307)
|
||||
|
||||
**Full Changelog**: https://github.com/StuffAnThings/qbit_manage/compare/v3.6.2...v3.6.3
|
||||
**Full Changelog**: https://github.com/StuffAnThings/qbit_manage/compare/v3.6.3...v3.6.4
|
||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
3.6.3
|
||||
3.6.4
|
||||
|
|
|
@ -29,6 +29,7 @@ COMMANDS = [
|
|||
"rem_orphaned",
|
||||
"tag_nohardlinks",
|
||||
"skip_cleanup",
|
||||
"skip_qb_version_check",
|
||||
"dry_run",
|
||||
]
|
||||
|
||||
|
@ -82,6 +83,7 @@ class Config:
|
|||
logger.debug(f" --rem-orphaned (QBT_REM_ORPHANED): {self.commands['rem_orphaned']}")
|
||||
logger.debug(f" --tag-nohardlinks (QBT_TAG_NOHARDLINKS): {self.commands['tag_nohardlinks']}")
|
||||
logger.debug(f" --skip-cleanup (QBT_SKIP_CLEANUP): {self.commands['skip_cleanup']}")
|
||||
logger.debug(f" --skip-qb-version-check (QBT_SKIP_QB_VERSION_CHECK): {self.commands['skip_qb_version_check']}")
|
||||
logger.debug(f" --dry-run (QBT_DRY_RUN): {self.commands['dry_run']}")
|
||||
else:
|
||||
self.commands = args
|
||||
|
|
|
@ -48,19 +48,24 @@ class Qbt:
|
|||
f"Qbittorrent Error: qbit_manage is only compatible with {self.MIN_SUPPORTED_VERSION} or higher. "
|
||||
f"You are currently on {self.current_version}."
|
||||
+ "\n"
|
||||
+ f"Please upgrade to your Qbittorrent version to {self.MIN_SUPPORTED_VERSION} or higher to use qbit_manage."
|
||||
+ f"Please upgrade your qBittorrent version to {self.MIN_SUPPORTED_VERSION} or higher to use qbit_manage."
|
||||
)
|
||||
elif not Version.is_app_version_supported(self.current_version):
|
||||
ex = (
|
||||
f"Qbittorrent Error: qbit_manage is only compatible with {self.SUPPORTED_VERSION} or lower. "
|
||||
f"You are currently on {self.current_version}."
|
||||
+ "\n"
|
||||
+ f"Please downgrade to your Qbittorrent version to {self.SUPPORTED_VERSION} to use qbit_manage."
|
||||
+ f"Please downgrade your qBittorrent version to {self.SUPPORTED_VERSION} to use qbit_manage."
|
||||
)
|
||||
if ex:
|
||||
self.config.notify(ex, "Qbittorrent")
|
||||
logger.print_line(ex, "CRITICAL")
|
||||
sys.exit(0)
|
||||
if self.config.commands["skip_qb_version_check"]:
|
||||
logger.print_line(
|
||||
"Continuing because qBittorrent version check is bypassed... Please do not ask for support!"
|
||||
)
|
||||
else:
|
||||
sys.exit(0)
|
||||
else:
|
||||
logger.info("Qbt Connection Successful")
|
||||
except LoginFailed as exc:
|
||||
|
|
|
@ -398,7 +398,18 @@ class CheckHardLinks:
|
|||
def get_inode_count(self):
|
||||
self.inode_count = {}
|
||||
for file in self.root_files:
|
||||
inode_no = os.stat(file.replace(self.root_dir, self.remote_dir)).st_ino
|
||||
try:
|
||||
inode_no = os.stat(file.replace(self.root_dir, self.remote_dir)).st_ino
|
||||
except PermissionError as perm:
|
||||
logger.warning(f"{perm} : file {file} has permission issues. Skipping...")
|
||||
continue
|
||||
except FileNotFoundError as file_not_found_error:
|
||||
logger.warning(f"{file_not_found_error} : File {file} not found. Skipping...")
|
||||
continue
|
||||
except Exception as ex:
|
||||
logger.stacktrace()
|
||||
logger.error(ex)
|
||||
continue
|
||||
if inode_no in self.inode_count:
|
||||
self.inode_count[inode_no] += 1
|
||||
else:
|
||||
|
|
|
@ -149,6 +149,16 @@ parser.add_argument(
|
|||
default=False,
|
||||
help="Use this to skip cleaning up Recycle Bin/Orphaned directory.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"-svc",
|
||||
"--skip-qb-version-check",
|
||||
dest="skip_qb_version_check",
|
||||
action="store_true",
|
||||
default=False,
|
||||
# help="Bypass qBittorrent/libtorrent version compatibility check. "
|
||||
# "You run the risk of undesirable behavior and will receive no support.",
|
||||
help=argparse.SUPPRESS,
|
||||
)
|
||||
parser.add_argument(
|
||||
"-dr",
|
||||
"--dry-run",
|
||||
|
@ -228,6 +238,7 @@ tag_tracker_error = get_arg("QBT_TAG_TRACKER_ERROR", args.tag_tracker_error, arg
|
|||
rem_orphaned = get_arg("QBT_REM_ORPHANED", args.rem_orphaned, arg_bool=True)
|
||||
tag_nohardlinks = get_arg("QBT_TAG_NOHARDLINKS", args.tag_nohardlinks, arg_bool=True)
|
||||
skip_cleanup = get_arg("QBT_SKIP_CLEANUP", args.skip_cleanup, arg_bool=True)
|
||||
skip_qb_version_check = get_arg("QBT_SKIP_QB_VERSION_CHECK", args.skip_qb_version_check, arg_bool=True)
|
||||
dry_run = get_arg("QBT_DRY_RUN", args.dry_run, arg_bool=True)
|
||||
log_level = get_arg("QBT_LOG_LEVEL", args.log_level)
|
||||
divider = get_arg("QBT_DIVIDER", args.divider)
|
||||
|
@ -275,6 +286,7 @@ for v in [
|
|||
"rem_orphaned",
|
||||
"tag_nohardlinks",
|
||||
"skip_cleanup",
|
||||
"skip_qb_version_check",
|
||||
"dry_run",
|
||||
"log_level",
|
||||
"divider",
|
||||
|
@ -572,6 +584,7 @@ if __name__ == "__main__":
|
|||
logger.debug(f" --rem-orphaned (QBT_REM_ORPHANED): {rem_orphaned}")
|
||||
logger.debug(f" --tag-nohardlinks (QBT_TAG_NOHARDLINKS): {tag_nohardlinks}")
|
||||
logger.debug(f" --skip-cleanup (QBT_SKIP_CLEANUP): {skip_cleanup}")
|
||||
logger.debug(f" --skip-qb-version-check (QBT_SKIP_QB_VERSION_CHECK): {skip_qb_version_check}")
|
||||
logger.debug(f" --dry-run (QBT_DRY_RUN): {dry_run}")
|
||||
logger.debug(f" --log-level (QBT_LOG_LEVEL): {log_level}")
|
||||
logger.debug(f" --divider (QBT_DIVIDER): {divider}")
|
||||
|
|
|
@ -5,5 +5,5 @@ pre-commit==3.3.2
|
|||
qbittorrent-api==2023.4.47
|
||||
requests==2.31.0
|
||||
retrying==1.3.4
|
||||
ruamel.yaml==0.17.26
|
||||
ruamel.yaml==0.17.27
|
||||
schedule==1.2.0
|
||||
|
|
Loading…
Add table
Reference in a new issue