summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDjLegolas <djlegolas@protonmail.com>2022-08-26 02:50:13 +0300
committerCalum Lind <calumlind+deluge@gmail.com>2023-02-24 11:38:28 +0000
commit8332d1aa393c40feced5af2693755ede7420d020 (patch)
tree8cae1ed92ad9033f0c0b3a80d6ec6a77c387d7ae
parent6f7445be18a0a75b37e1a9c22d60dc7d9c7b32ce (diff)
downloaddeluge-8332d1aa393c40feced5af2693755ede7420d020.tar.gz
deluge-8332d1aa393c40feced5af2693755ede7420d020.tar.bz2
deluge-8332d1aa393c40feced5af2693755ede7420d020.zip
[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
-rw-r--r--deluge/plugins/Label/deluge_label/core.py4
1 files 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]