From acb23f73bac44771b30587bb6e8a0caa33f80036 Mon Sep 17 00:00:00 2001 From: bobokun Date: Sun, 11 Feb 2024 16:31:01 -0500 Subject: [PATCH] Bug fix in #359 --- VERSION | 2 +- modules/core/recheck.py | 3 ++- modules/core/remove_unregistered.py | 6 +++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/VERSION b/VERSION index 7111c78..cbbf0a0 100755 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.0.9-develop5 +4.0.9-develop6 diff --git a/modules/core/recheck.py b/modules/core/recheck.py index 3f83625..4794b05 100644 --- a/modules/core/recheck.py +++ b/modules/core/recheck.py @@ -1,6 +1,7 @@ from datetime import timedelta from modules import util +from modules.util import remove_extension logger = util.logger @@ -105,7 +106,7 @@ class ReCheck: # Recheck elif ( torrent.progress == 0 - and self.qbt.torrentinfo[t_name]["is_complete"] + and self.qbt.torrentinfo[remove_extension(t_name)]["is_complete"] and not torrent.state_enum.is_checking ): self.stats_rechecked += 1 diff --git a/modules/core/remove_unregistered.py b/modules/core/remove_unregistered.py index 117e328..8661e3a 100644 --- a/modules/core/remove_unregistered.py +++ b/modules/core/remove_unregistered.py @@ -97,7 +97,7 @@ class RemoveUnregistered: self.notify_attr_unreg = [] # List of single torrent attributes to send to notifiarr for torrent in self.qbt.torrentissue: - self.t_name = torrent.name + self.t_name = remove_extension(torrent.name) self.t_cat = self.qbt.torrentinfo[self.t_name]["Category"] self.t_msg = self.qbt.torrentinfo[self.t_name]["msg"] self.t_status = self.qbt.torrentinfo[self.t_name]["status"] @@ -210,7 +210,7 @@ class RemoveUnregistered: "torrent_tracker": tracker["url"], "notifiarr_indexer": tracker["notifiarr"], } - if self.qbt.torrentinfo[remove_extension(self.t_name)]["count"] > 1: + if self.qbt.torrentinfo[self.t_name]["count"] > 1: # Checks if any of the original torrents are working if "" in self.t_msg or 2 in self.t_status: attr["torrents_deleted_and_contents"] = False @@ -233,4 +233,4 @@ class RemoveUnregistered: attr["body"] = "\n".join(body) self.torrents_updated_unreg.append(self.t_name) self.notify_attr_unreg.append(attr) - self.qbt.torrentinfo[remove_extension(self.t_name)]["count"] -= 1 + self.qbt.torrentinfo[self.t_name]["count"] -= 1