Skip to content

Commit

Permalink
修复blocklist为空时gktui不更新问题
Browse files Browse the repository at this point in the history
  • Loading branch information
azicen committed Jun 28, 2024
1 parent 78de9d6 commit 41e9468
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion deluge_peerbanhelperadapter/gtk3ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
__plugin_name__ = 'PeerBanHelperAdapter'
__author__ = 'azicen'
__author_email__ = '[email protected]'
__version__ = '0.0.1'
__version__ = '0.1'
__url__ = 'https://github.com/PBH-BTN/PBH-Adapter-Deluge'
__license__ = 'MIT license'
__description__ = 'PeerBanHelper Deluge Adapter Plugin.'
Expand Down

0 comments on commit 41e9468

Please sign in to comment.