From 41e9468115e95e446a5e32e25baa7d460e38731e Mon Sep 17 00:00:00 2001 From: azicen Date: Fri, 28 Jun 2024 15:12:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dblocklist=E4=B8=BA=E7=A9=BA?= =?UTF-8?q?=E6=97=B6gktui=E4=B8=8D=E6=9B=B4=E6=96=B0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deluge_peerbanhelperadapter/gtk3ui.py | 3 ++- setup.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/deluge_peerbanhelperadapter/gtk3ui.py b/deluge_peerbanhelperadapter/gtk3ui.py index 62eb7b8..5df19a5 100644 --- a/deluge_peerbanhelperadapter/gtk3ui.py +++ b/deluge_peerbanhelperadapter/gtk3ui.py @@ -59,7 +59,8 @@ def cb_get_config(self, config): self.update_text_blocklist(blocklist) def update_text_blocklist(self, blocklist): - if not blocklist: + if not blocklist or len(blocklist) == 0: + self.builder.get_object("text_blocklist").get_buffer().set_text('', 0) return text = '\n'.join([ip for ip in blocklist]) self.builder.get_object("text_blocklist").get_buffer().set_text(text, len(text)) diff --git a/setup.py b/setup.py index cb68888..5151ada 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ __plugin_name__ = 'PeerBanHelperAdapter' __author__ = 'azicen' __author_email__ = 'chenjiazi2000@outlook.com' -__version__ = '0.0.1' +__version__ = '0.1' __url__ = 'https://github.com/PBH-BTN/PBH-Adapter-Deluge' __license__ = 'MIT license' __description__ = 'PeerBanHelper Deluge Adapter Plugin.'