Merge pull request #153 from hotlcc/develop-20240330-下载器助手插件问题修复

This commit is contained in:
jxxghp
2024-03-30 13:37:35 +08:00
committed by GitHub
2 changed files with 6 additions and 6 deletions

View File

@@ -458,7 +458,7 @@
"DownloaderHelper": {
"name": "下载器助手",
"description": "自动做种、站点标签、自动删种。",
"version": "1.2",
"version": "1.3",
"icon": "DownloaderHelper.png",
"author": "hotlcc",
"level": 2

View File

@@ -32,7 +32,7 @@ class DownloaderHelper(_PluginBase):
# 插件图标
plugin_icon = "DownloaderHelper.png"
# 插件版本
plugin_version = "1.2"
plugin_version = "1.3"
# 插件作者
plugin_author = "hotlcc"
# 作者主页
@@ -1541,12 +1541,12 @@ class DownloaderHelper(_PluginBase):
# 执行
logger.info('下载添加事件监听任务执行开始...')
context = TaskContext().enable_seeding(False).enable_tagging(True).enable_delete(False)
hash_str = event.event_data.get('hash')
if hash:
context.select_torrent(hash_str)
_hash = event.event_data.get('hash')
if _hash:
context.select_torrent(torrent=_hash)
username = event.event_data.get('username')
if username:
context.select_username(username)
context.set_username(username=username)
self.__run_for_all(context=context)
logger.info('下载添加事件监听任务执行结束')