From 7b8aa3b015d8e3f0553c77c174dd7c5896e017ac Mon Sep 17 00:00:00 2001 From: bobokun Date: Sun, 9 Apr 2023 15:37:23 -0400 Subject: [PATCH] Fixes #260 --- CHANGELOG | 16 +++------------- modules/qbittorrent.py | 5 +++++ 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 60d8910..7a14d0c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,15 +1,5 @@ -# Requirements Updated -- Adds check for minimum python requirement of 3.8.1+ (Fixes #221) -- Updates qbitorrent api to 2023.3.44 - -# New Features -- Adds support for custom noHL tag (closes #210) - # Bug Fixes -- Fix wrapped JSON Decod error from requests (#245) - Thanks @USA-RedDragon -- Code Refactor / lint - Thanks @bakerboy448 -- Adds docstrings - Thanks @bakerboy448 -- Fixes #229 - Thanks @bakerboy448 -- Fixes #218 - Thanks @bakerboy448 +- Fixes #255 +- Fixes #260 -**Full Changelog**: https://github.com/StuffAnThings/qbit_manage/compare/v3.4.4...v3.5.0 +**Full Changelog**: https://github.com/StuffAnThings/qbit_manage/compare/v3.5.0...v3.5.1 diff --git a/modules/qbittorrent.py b/modules/qbittorrent.py index 297f4c9..812af84 100755 --- a/modules/qbittorrent.py +++ b/modules/qbittorrent.py @@ -1349,3 +1349,8 @@ class Qbt: torrent.delete(delete_files=True) else: torrent.delete(delete_files=False) + try: + if torrent in self.torrent_list: + self.torrent_list.remove(torrent) + except ValueError: + logger.debug(f"Torrent {torrent.name} has already been deleted from torrent list.")