From 97f250319bcde31008eac41f0c1e95a45cae91dc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 25 May 2023 00:59:11 +0000 Subject: [PATCH 1/7] Bump dependabot/fetch-metadata from 1.5.0 to 1.5.1 Bumps [dependabot/fetch-metadata](https://github.com/dependabot/fetch-metadata) from 1.5.0 to 1.5.1. - [Release notes](https://github.com/dependabot/fetch-metadata/releases) - [Commits](https://github.com/dependabot/fetch-metadata/compare/v1.5.0...v1.5.1) --- updated-dependencies: - dependency-name: dependabot/fetch-metadata dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/dependabot-approve-and-auto-merge.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dependabot-approve-and-auto-merge.yml b/.github/workflows/dependabot-approve-and-auto-merge.yml index 9c059b7..22dbab7 100644 --- a/.github/workflows/dependabot-approve-and-auto-merge.yml +++ b/.github/workflows/dependabot-approve-and-auto-merge.yml @@ -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. From 657a7f05ccbf08bfd985bb316e4daa5a9637f612 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 26 May 2023 00:59:52 +0000 Subject: [PATCH 2/7] Bump ruamel-yaml from 0.17.26 to 0.17.27 Bumps [ruamel-yaml](https://sourceforge.net/p/ruamel-yaml/code/ci/default/tree) from 0.17.26 to 0.17.27. --- updated-dependencies: - dependency-name: ruamel-yaml dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 17d2511..44d66f7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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 From d2f81e2694f62b8050baa74777aba3f6917c2618 Mon Sep 17 00:00:00 2001 From: bobokun Date: Fri, 26 May 2023 16:20:33 -0400 Subject: [PATCH 3/7] Fixes #302 --- VERSION | 2 +- modules/util.py | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 4a788a0..7eea513 100755 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.6.3 +3.6.3-develop6 diff --git a/modules/util.py b/modules/util.py index c4c5304..c145d73 100755 --- a/modules/util.py +++ b/modules/util.py @@ -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: From 8c0b7c6a2b8317f148cd466fbbe297a50357ac9a Mon Sep 17 00:00:00 2001 From: ftc2 Date: Fri, 26 May 2023 18:30:15 -0500 Subject: [PATCH 4/7] FEAT: bypass qBittorrent version check add feature `--skip-qb-version-check` (`QBT_SKIP_QB_VERSION_CHECK`). allows running qbit_manage on unsupported versions of qBittorrent/libtorrent. this is hidden/suppressed for now in argparse to reduce support burden. --- modules/config.py | 2 ++ modules/qbittorrent.py | 9 ++++++--- qbit_manage.py | 12 ++++++++++++ 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/modules/config.py b/modules/config.py index b09a070..0ccb440 100755 --- a/modules/config.py +++ b/modules/config.py @@ -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 diff --git a/modules/qbittorrent.py b/modules/qbittorrent.py index 99b9903..b24c283 100755 --- a/modules/qbittorrent.py +++ b/modules/qbittorrent.py @@ -48,19 +48,22 @@ 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: diff --git a/qbit_manage.py b/qbit_manage.py index 32106c9..f1be9b2 100755 --- a/qbit_manage.py +++ b/qbit_manage.py @@ -149,6 +149,15 @@ 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 +237,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 +285,7 @@ for v in [ "rem_orphaned", "tag_nohardlinks", "skip_cleanup", + "skip_qb_version_check", "dry_run", "log_level", "divider", @@ -572,6 +583,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}") From 285b4afbb91767abb3a61860cc13578e4c8fd97d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 27 May 2023 00:28:01 +0000 Subject: [PATCH 5/7] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- modules/qbittorrent.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/qbittorrent.py b/modules/qbittorrent.py index b24c283..7344f89 100755 --- a/modules/qbittorrent.py +++ b/modules/qbittorrent.py @@ -61,7 +61,9 @@ class Qbt: self.config.notify(ex, "Qbittorrent") logger.print_line(ex, "CRITICAL") if self.config.commands["skip_qb_version_check"]: - logger.print_line("Continuing because qBittorrent version check is bypassed... Please do not ask for support!") + logger.print_line( + "Continuing because qBittorrent version check is bypassed... Please do not ask for support!" + ) else: sys.exit(0) else: From 717a6ec51c0667a34ce94a0fff662d03383333ef Mon Sep 17 00:00:00 2001 From: ftc2 Date: Fri, 26 May 2023 19:53:25 -0500 Subject: [PATCH 6/7] STYLE: break long line, version bump --- VERSION | 2 +- qbit_manage.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 7eea513..c29a8c5 100755 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.6.3-develop6 +3.6.3-develop7 diff --git a/qbit_manage.py b/qbit_manage.py index f1be9b2..851a66a 100755 --- a/qbit_manage.py +++ b/qbit_manage.py @@ -155,7 +155,8 @@ parser.add_argument( 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="Bypass qBittorrent/libtorrent version compatibility check. " + # "You run the risk of undesirable behavior and will receive no support.", help=argparse.SUPPRESS, ) parser.add_argument( From 8c48ecdc37840720a76fcb43e905bb71318c4fb9 Mon Sep 17 00:00:00 2001 From: bobokun Date: Sun, 28 May 2023 14:19:07 -0400 Subject: [PATCH 7/7] 3.6.4 --- CHANGELOG | 20 ++++---------------- VERSION | 2 +- 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 197cd8b..0d60abc 100644 --- a/CHANGELOG +++ b/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 diff --git a/VERSION b/VERSION index c29a8c5..0f44168 100755 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.6.3-develop7 +3.6.4