mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-07 00:16:57 +08:00
fix actions
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user