fix actions

This commit is contained in:
jxxghp
2025-02-27 13:09:01 +08:00
parent 4a42b0d000
commit ab0008be86
16 changed files with 116 additions and 29 deletions
+9 -1
View File
@@ -1,4 +1,4 @@
from app.actions import BaseAction
from app.actions import BaseAction, ActionChain
from app.schemas import ActionParams, ActionContext
from app.log import logger
@@ -17,6 +17,10 @@ class FetchDownloadsAction(BaseAction):
_downloads = []
def __init__(self):
super().__init__()
self.chain = ActionChain()
@property
def name(self) -> str:
return "获取下载任务"
@@ -25,6 +29,10 @@ class FetchDownloadsAction(BaseAction):
def description(self) -> str:
return "获取下载任务,更新任务状态"
@property
def data(self) -> dict:
return FetchDownloadsParams().dict()
@property
def success(self) -> bool:
if not self._downloads: