mirror of
https://github.com/d0zingcat/MoviePilot-Plugins.git
synced 2026-05-13 23:16:47 +00:00
feat: 增加刷流任务时支持触发插件事件
This commit is contained in:
@@ -25,6 +25,7 @@ from app.modules.qbittorrent import Qbittorrent
|
||||
from app.modules.transmission import Transmission
|
||||
from app.plugins import _PluginBase
|
||||
from app.schemas import NotificationType, TorrentInfo, MediaType
|
||||
from app.schemas.types import EventType
|
||||
from app.utils.http import RequestUtils
|
||||
from app.utils.string import StringUtils
|
||||
|
||||
@@ -2120,6 +2121,12 @@ class BrushFlow(_PluginBase):
|
||||
"time": time.time()
|
||||
}
|
||||
|
||||
self.eventmanager.send_event(etype=EventType.PluginAction, data={
|
||||
"action": "brushflow_download_added",
|
||||
"data": torrent_task
|
||||
})
|
||||
torrent_tasks[hash_string] = torrent_task
|
||||
|
||||
# 统计数据
|
||||
torrents_size += torrent.size
|
||||
statistic_info["count"] += 1
|
||||
|
||||
Reference in New Issue
Block a user