From a64fe05890d910b85eda29dc47cd2ad9072a3add Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Fri, 12 Oct 2012 23:48:36 +0100 Subject: [PATCH] Ensure torrent_ids is a list If torrent_ids is created from filter_dict it is a tuple. This results in an error when attempting to remove a torrent_id from torrent_ids later on in 'leftover filter args' and 'filter_state_active()'. --- deluge/core/filtermanager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deluge/core/filtermanager.py b/deluge/core/filtermanager.py index 110443f0d..d806025d3 100644 --- a/deluge/core/filtermanager.py +++ b/deluge/core/filtermanager.py @@ -130,8 +130,8 @@ class FilterManager(component.Component): filter_dict[key] = [value] - if "id"in filter_dict: #optimized filter for id: - torrent_ids = filter_dict["id"] + if "id" in filter_dict: #optimized filter for id: + torrent_ids = list(filter_dict["id"]) del filter_dict["id"] else: torrent_ids = self.torrents.get_torrent_list()