mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-04 23:17:20 +08:00
feat:资源下载事件保存路径
This commit is contained in:
@@ -188,6 +188,9 @@ class DownloadChain(ChainBase):
|
|||||||
f"Resource download canceled by event: {event_data.source},"
|
f"Resource download canceled by event: {event_data.source},"
|
||||||
f"Reason: {event_data.reason}")
|
f"Reason: {event_data.reason}")
|
||||||
return None
|
return None
|
||||||
|
# 如果事件修改了下载路径,使用新路径
|
||||||
|
if event_data.options and event_data.options.get("save_path"):
|
||||||
|
save_path = event_data.options.get("save_path")
|
||||||
|
|
||||||
# 补充完整的media数据
|
# 补充完整的media数据
|
||||||
if not _media.genre_ids:
|
if not _media.genre_ids:
|
||||||
|
|||||||
@@ -214,7 +214,7 @@ class ResourceDownloadEventData(ChainEventData):
|
|||||||
channel: Optional[MessageChannel] = Field(None, description="通知渠道")
|
channel: Optional[MessageChannel] = Field(None, description="通知渠道")
|
||||||
origin: Optional[str] = Field(None, description="来源")
|
origin: Optional[str] = Field(None, description="来源")
|
||||||
downloader: Optional[str] = Field(None, description="下载器")
|
downloader: Optional[str] = Field(None, description="下载器")
|
||||||
options: Optional[dict] = Field(None, description="其他参数")
|
options: Optional[dict] = Field(default={}, description="其他参数")
|
||||||
|
|
||||||
# 输出参数
|
# 输出参数
|
||||||
cancel: bool = Field(default=False, description="是否取消下载")
|
cancel: bool = Field(default=False, description="是否取消下载")
|
||||||
|
|||||||
Reference in New Issue
Block a user