mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-07-08 08:11:31 +08:00
fix actions
This commit is contained in:
@@ -31,7 +31,7 @@ class AddDownloadAction(BaseAction):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def name(self) -> str:
|
def name(self) -> str:
|
||||||
return "添加下载资源"
|
return "添加下载"
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def description(self) -> str:
|
def description(self) -> str:
|
||||||
|
|||||||
@@ -81,13 +81,24 @@ class FetchMediasAction(BaseAction):
|
|||||||
|
|
||||||
__medias = []
|
__medias = []
|
||||||
|
|
||||||
|
def __init__(self):
|
||||||
|
super().__init__()
|
||||||
|
# 广播事件,请示额外的推荐数据源支持
|
||||||
|
event_data = RecommendSourceEventData()
|
||||||
|
event = eventmanager.send_event(ChainEventType.RecommendSource, event_data)
|
||||||
|
# 使用事件返回的上下文数据
|
||||||
|
if event and event.event_data:
|
||||||
|
event_data: RecommendSourceEventData = event.event_data
|
||||||
|
if event_data.extra_sources:
|
||||||
|
self.__inner_sources.extend([s.dict() for s in event_data.extra_sources])
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def name(self) -> str:
|
def name(self) -> str:
|
||||||
return "获取媒体数据"
|
return "获取媒体数据"
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def description(self) -> str:
|
def description(self) -> str:
|
||||||
return "获取媒体数据"
|
return "获取榜单等媒体数据列表"
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def data(self) -> dict:
|
def data(self) -> dict:
|
||||||
@@ -110,15 +121,6 @@ class FetchMediasAction(BaseAction):
|
|||||||
"""
|
"""
|
||||||
获取媒体数据,填充到medias
|
获取媒体数据,填充到medias
|
||||||
"""
|
"""
|
||||||
# 广播事件,请示额外的推荐数据源支持
|
|
||||||
event_data = RecommendSourceEventData()
|
|
||||||
event = eventmanager.send_event(ChainEventType.RecommendSource, event_data)
|
|
||||||
# 使用事件返回的上下文数据
|
|
||||||
if event and event.event_data:
|
|
||||||
event_data: RecommendSourceEventData = event.event_data
|
|
||||||
if event_data.extra_sources:
|
|
||||||
self.__inner_sources.extend([s.dict() for s in event_data.extra_sources])
|
|
||||||
|
|
||||||
for name in params.sources:
|
for name in params.sources:
|
||||||
source = self.__get_source(name)
|
source = self.__get_source(name)
|
||||||
if not source:
|
if not source:
|
||||||
|
|||||||
@@ -37,11 +37,11 @@ class FetchRssAction(BaseAction):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def name(self) -> str:
|
def name(self) -> str:
|
||||||
return "获取RSS资源列表"
|
return "获取RSS资源"
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def description(self) -> str:
|
def description(self) -> str:
|
||||||
return "请求RSS地址获取数据,并解析为资源列表"
|
return "订阅RSS地址获取资源"
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def data(self) -> dict:
|
def data(self) -> dict:
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ class FetchTorrentsAction(BaseAction):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def name(self) -> str:
|
def name(self) -> str:
|
||||||
return "获取站点资源"
|
return "搜索站点资源"
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def description(self) -> str:
|
def description(self) -> str:
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ class FilterMediasAction(BaseAction):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def description(self) -> str:
|
def description(self) -> str:
|
||||||
return "过滤媒体数据列表"
|
return "对媒体数据列表进行过滤"
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def data(self) -> dict:
|
def data(self) -> dict:
|
||||||
|
|||||||
@@ -34,11 +34,11 @@ class FilterTorrentsAction(BaseAction):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def name(self) -> str:
|
def name(self) -> str:
|
||||||
return "过滤资源数据"
|
return "过滤资源"
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def description(self) -> str:
|
def description(self) -> str:
|
||||||
return "过滤资源数据列表"
|
return "对资源列表数据进行过滤"
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def data(self) -> dict:
|
def data(self) -> dict:
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ class TransferFileAction(BaseAction):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def description(self) -> str:
|
def description(self) -> str:
|
||||||
return "整理和转移文件"
|
return "转移和重命名文件"
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def data(self) -> dict:
|
def data(self) -> dict:
|
||||||
|
|||||||
Reference in New Issue
Block a user