mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-08 17:08:35 +08:00
fix actions
This commit is contained in:
@@ -0,0 +1,34 @@
|
|||||||
|
from app.actions import BaseAction
|
||||||
|
from app.schemas import ActionParams, ActionContext
|
||||||
|
|
||||||
|
|
||||||
|
class AddDownloadParams(ActionParams):
|
||||||
|
"""
|
||||||
|
添加下载资源参数
|
||||||
|
"""
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class AddDownloadAction(BaseAction):
|
||||||
|
"""
|
||||||
|
添加下载资源
|
||||||
|
"""
|
||||||
|
|
||||||
|
@property
|
||||||
|
def name(self) -> str:
|
||||||
|
return "添加下载资源"
|
||||||
|
|
||||||
|
@property
|
||||||
|
def description(self) -> str:
|
||||||
|
return "根据资源列表添加下载任务"
|
||||||
|
|
||||||
|
@property
|
||||||
|
def done(self) -> bool:
|
||||||
|
return True
|
||||||
|
|
||||||
|
@property
|
||||||
|
def success(self) -> bool:
|
||||||
|
return True
|
||||||
|
|
||||||
|
async def execute(self, params: AddDownloadParams, context: ActionContext) -> ActionContext:
|
||||||
|
pass
|
||||||
|
|||||||
@@ -0,0 +1,34 @@
|
|||||||
|
from app.actions import BaseAction
|
||||||
|
from app.schemas import ActionParams, ActionContext
|
||||||
|
|
||||||
|
|
||||||
|
class AddSubscribeParams(ActionParams):
|
||||||
|
"""
|
||||||
|
添加订阅参数
|
||||||
|
"""
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class AddSubscribeAction(BaseAction):
|
||||||
|
"""
|
||||||
|
添加订阅
|
||||||
|
"""
|
||||||
|
|
||||||
|
@property
|
||||||
|
def name(self) -> str:
|
||||||
|
return "添加订阅"
|
||||||
|
|
||||||
|
@property
|
||||||
|
def description(self) -> str:
|
||||||
|
return "根据媒体列表添加订阅"
|
||||||
|
|
||||||
|
@property
|
||||||
|
def done(self) -> bool:
|
||||||
|
return True
|
||||||
|
|
||||||
|
@property
|
||||||
|
def success(self) -> bool:
|
||||||
|
return True
|
||||||
|
|
||||||
|
async def execute(self, params: AddSubscribeParams, context: ActionContext) -> ActionContext:
|
||||||
|
pass
|
||||||
|
|||||||
@@ -0,0 +1,34 @@
|
|||||||
|
from app.actions import BaseAction
|
||||||
|
from app.schemas import ActionParams, ActionContext
|
||||||
|
|
||||||
|
|
||||||
|
class FetchDownloadsParams(ActionParams):
|
||||||
|
"""
|
||||||
|
获取下载任务参数
|
||||||
|
"""
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class FetchDownloadsAction(BaseAction):
|
||||||
|
"""
|
||||||
|
获取下载任务
|
||||||
|
"""
|
||||||
|
|
||||||
|
@property
|
||||||
|
def name(self) -> str:
|
||||||
|
return "获取下载任务"
|
||||||
|
|
||||||
|
@property
|
||||||
|
def description(self) -> str:
|
||||||
|
return "获取下载任务,更新任务状态"
|
||||||
|
|
||||||
|
@property
|
||||||
|
def done(self) -> bool:
|
||||||
|
return True
|
||||||
|
|
||||||
|
@property
|
||||||
|
def success(self) -> bool:
|
||||||
|
return True
|
||||||
|
|
||||||
|
async def execute(self, params: FetchDownloadsParams, context: ActionContext) -> ActionContext:
|
||||||
|
pass
|
||||||
|
|||||||
@@ -0,0 +1,34 @@
|
|||||||
|
from app.actions import BaseAction
|
||||||
|
from app.schemas import ActionParams, ActionContext
|
||||||
|
|
||||||
|
|
||||||
|
class FetchMediasParams(ActionParams):
|
||||||
|
"""
|
||||||
|
获取媒体数据参数
|
||||||
|
"""
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class FetchMediasAction(BaseAction):
|
||||||
|
"""
|
||||||
|
获取媒体数据
|
||||||
|
"""
|
||||||
|
|
||||||
|
@property
|
||||||
|
def name(self) -> str:
|
||||||
|
return "获取媒体数据"
|
||||||
|
|
||||||
|
@property
|
||||||
|
def description(self) -> str:
|
||||||
|
return "获取媒体数据"
|
||||||
|
|
||||||
|
@property
|
||||||
|
def done(self) -> bool:
|
||||||
|
return True
|
||||||
|
|
||||||
|
@property
|
||||||
|
def success(self) -> bool:
|
||||||
|
return True
|
||||||
|
|
||||||
|
async def execute(self, params: FetchMediasParams, context: ActionContext) -> ActionContext:
|
||||||
|
pass
|
||||||
|
|||||||
@@ -0,0 +1,34 @@
|
|||||||
|
from app.actions import BaseAction
|
||||||
|
from app.schemas import ActionParams, ActionContext
|
||||||
|
|
||||||
|
|
||||||
|
class FilterMediasParams(ActionParams):
|
||||||
|
"""
|
||||||
|
过滤媒体数据参数
|
||||||
|
"""
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class FilterMediasAction(BaseAction):
|
||||||
|
"""
|
||||||
|
过滤媒体数据
|
||||||
|
"""
|
||||||
|
|
||||||
|
@property
|
||||||
|
def name(self) -> str:
|
||||||
|
return "过滤媒体数据"
|
||||||
|
|
||||||
|
@property
|
||||||
|
def description(self) -> str:
|
||||||
|
return "过滤媒体数据列表"
|
||||||
|
|
||||||
|
@property
|
||||||
|
def done(self) -> bool:
|
||||||
|
return True
|
||||||
|
|
||||||
|
@property
|
||||||
|
def success(self) -> bool:
|
||||||
|
return True
|
||||||
|
|
||||||
|
async def execute(self, params: FilterMediasParams, context: ActionContext) -> ActionContext:
|
||||||
|
pass
|
||||||
|
|||||||
@@ -0,0 +1,34 @@
|
|||||||
|
from app.actions import BaseAction
|
||||||
|
from app.schemas import ActionParams, ActionContext
|
||||||
|
|
||||||
|
|
||||||
|
class FilterTorrentsParams(ActionParams):
|
||||||
|
"""
|
||||||
|
过滤资源数据参数
|
||||||
|
"""
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class FilterTorrentsAction(BaseAction):
|
||||||
|
"""
|
||||||
|
过滤资源数据
|
||||||
|
"""
|
||||||
|
|
||||||
|
@property
|
||||||
|
def name(self) -> str:
|
||||||
|
return "过滤资源数据"
|
||||||
|
|
||||||
|
@property
|
||||||
|
def description(self) -> str:
|
||||||
|
return "过滤资源数据列表"
|
||||||
|
|
||||||
|
@property
|
||||||
|
def done(self) -> bool:
|
||||||
|
return True
|
||||||
|
|
||||||
|
@property
|
||||||
|
def success(self) -> bool:
|
||||||
|
return True
|
||||||
|
|
||||||
|
async def execute(self, params: FilterTorrentsParams, context: ActionContext) -> ActionContext:
|
||||||
|
pass
|
||||||
|
|||||||
@@ -0,0 +1,34 @@
|
|||||||
|
from app.actions import BaseAction
|
||||||
|
from app.schemas import ActionParams, ActionContext
|
||||||
|
|
||||||
|
|
||||||
|
class ScrapeFileParams(ActionParams):
|
||||||
|
"""
|
||||||
|
刮削文件参数
|
||||||
|
"""
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class ScrapeFileAction(BaseAction):
|
||||||
|
"""
|
||||||
|
刮削文件
|
||||||
|
"""
|
||||||
|
|
||||||
|
@property
|
||||||
|
def name(self) -> str:
|
||||||
|
return "刮削文件"
|
||||||
|
|
||||||
|
@property
|
||||||
|
def description(self) -> str:
|
||||||
|
return "刮削媒体信息和图片"
|
||||||
|
|
||||||
|
@property
|
||||||
|
def done(self) -> bool:
|
||||||
|
return True
|
||||||
|
|
||||||
|
@property
|
||||||
|
def success(self) -> bool:
|
||||||
|
return True
|
||||||
|
|
||||||
|
async def execute(self, params: ScrapeFileParams, context: ActionContext) -> ActionContext:
|
||||||
|
pass
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
from app.actions import BaseAction
|
||||||
|
from app.schemas import ActionParams, ActionContext
|
||||||
|
|
||||||
|
|
||||||
|
class SendEventParams(ActionParams):
|
||||||
|
"""
|
||||||
|
发送事件参数
|
||||||
|
"""
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class SendEventAction(BaseAction):
|
||||||
|
"""
|
||||||
|
发送事件
|
||||||
|
"""
|
||||||
|
|
||||||
|
@property
|
||||||
|
def name(self) -> str:
|
||||||
|
return "发送事件"
|
||||||
|
|
||||||
|
@property
|
||||||
|
def description(self) -> str:
|
||||||
|
return "发送特定事件"
|
||||||
|
|
||||||
|
@property
|
||||||
|
def done(self) -> bool:
|
||||||
|
return True
|
||||||
|
|
||||||
|
@property
|
||||||
|
def success(self) -> bool:
|
||||||
|
return True
|
||||||
|
|
||||||
|
async def execute(self, params: SendEventParams, context: ActionContext) -> ActionContext:
|
||||||
|
pass
|
||||||
|
|||||||
@@ -0,0 +1,34 @@
|
|||||||
|
from app.actions import BaseAction
|
||||||
|
from app.schemas import ActionParams, ActionContext
|
||||||
|
|
||||||
|
|
||||||
|
class SendMessageParams(ActionParams):
|
||||||
|
"""
|
||||||
|
发送消息参数
|
||||||
|
"""
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class SendMessageAction(BaseAction):
|
||||||
|
"""
|
||||||
|
发送消息
|
||||||
|
"""
|
||||||
|
|
||||||
|
@property
|
||||||
|
def name(self) -> str:
|
||||||
|
return "发送消息"
|
||||||
|
|
||||||
|
@property
|
||||||
|
def description(self) -> str:
|
||||||
|
return "发送特定消息"
|
||||||
|
|
||||||
|
@property
|
||||||
|
def done(self) -> bool:
|
||||||
|
return True
|
||||||
|
|
||||||
|
@property
|
||||||
|
def success(self) -> bool:
|
||||||
|
return True
|
||||||
|
|
||||||
|
async def execute(self, params: SendMessageParams, context: ActionContext) -> ActionContext:
|
||||||
|
pass
|
||||||
|
|||||||
@@ -0,0 +1,34 @@
|
|||||||
|
from app.actions import BaseAction
|
||||||
|
from app.schemas import ActionParams, ActionContext
|
||||||
|
|
||||||
|
|
||||||
|
class TransferFileParams(ActionParams):
|
||||||
|
"""
|
||||||
|
整理文件参数
|
||||||
|
"""
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class TransferFileAction(BaseAction):
|
||||||
|
"""
|
||||||
|
整理文件
|
||||||
|
"""
|
||||||
|
|
||||||
|
@property
|
||||||
|
def name(self) -> str:
|
||||||
|
return "整理文件"
|
||||||
|
|
||||||
|
@property
|
||||||
|
def description(self) -> str:
|
||||||
|
return "整理和转移文件"
|
||||||
|
|
||||||
|
@property
|
||||||
|
def done(self) -> bool:
|
||||||
|
return True
|
||||||
|
|
||||||
|
@property
|
||||||
|
def success(self) -> bool:
|
||||||
|
return True
|
||||||
|
|
||||||
|
async def execute(self, params: TransferFileParams, context: ActionContext) -> ActionContext:
|
||||||
|
pass
|
||||||
|
|||||||
Reference in New Issue
Block a user