From 8332d1aa393c40feced5af2693755ede7420d020 Mon Sep 17 00:00:00 2001 From: DjLegolas Date: Fri, 26 Aug 2022 02:50:13 +0300 Subject: [PATCH] [Label] fix torrent deletion not removes from config when deleting a torrent, the on deletion hook deletes the torrent from the local config but does not save the new config to disk. note that when setting a new label to a torrent, the config does save. Closes: https://dev.deluge-torrent.org/ticket/3545 Closes: https://github.com/deluge-torrent/deluge/pull/397 --- deluge/plugins/Label/deluge_label/core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deluge/plugins/Label/deluge_label/core.py b/deluge/plugins/Label/deluge_label/core.py index a91275f03..c28490b46 100644 --- a/deluge/plugins/Label/deluge_label/core.py +++ b/deluge/plugins/Label/deluge_label/core.py @@ -137,6 +137,7 @@ class Core(CorePluginBase): log.debug('post_torrent_remove') if torrent_id in self.torrent_labels: del self.torrent_labels[torrent_id] + self.config.save() # Utils # def clean_config(self): @@ -191,8 +192,7 @@ class Core(CorePluginBase): """remove a label""" check_input(label_id in self.labels, _('Unknown Label')) del self.labels[label_id] - self.clean_config() - self.config.save() + self.save_config() def _set_torrent_options(self, torrent_id, label_id): options = self.labels[label_id]