feat(下载对话框): 学 MoviePilot 重做手动下载对话框

- 标题区:海报、作品名 (年份)、站点;资源行显示原始标题、促销、H&R、做种 / 下载、大小、发布时间
- 下载器与保存目录并排下拉,缺省「自动」,下方写明「将保存到」的实际路径;保留「自定义路径」
- 作品身份折叠区:类型 + TMDB 编号(可搜索作品),未识别时默认展开,指定后随下载绑定
- 已有版本先显示一行摘要,选一次性洗版才展开勾选列表
- 搜索、工作台、原站视图三处调用方补传资源字段

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Cxwgnn2pbzQ7rXv3rq7fei
This commit is contained in:
rootandClaude Opus 5.5 committed 2026-10-06 12:10:03 +08:00
1 parent 4bb19433ad
commit 6e645bce8f
7 files changed
+1012 -117

No files matched your search

+13
View File
@@ -6,6 +6,7 @@ import {
DownloadBoard,
type DownloadBoardState,
DownloaderInstance,
DownloadSavePaths,
type DownloadStatus,
DownloadTask,
DownloadWhy,
@@ -31,8 +32,20 @@ export const downloadKeys = {
why: (id: string) => ["downloads", "why", id] as const,
cache: () => ["downloads", "cache"] as const,
board: (state: DownloadBoardState) => ["downloads", "board", state] as const,
savePaths: (siteId?: string) => ["downloads", "save-paths", siteId ?? null] as const,
};
/** 手动下载可选的下载器与保存目录;siteId 决定「自动」用哪个下载器 */
export function useDownloadSavePaths(siteId: string | undefined, enabled = true) {
return useQuery({
queryKey: downloadKeys.savePaths(siteId),
enabled,
queryFn: ({ signal }) =>
apiParsed(DownloadSavePaths, "/api/v1/download-save-paths", { params: cleanParams({ siteId }), signal }),
staleTime: 30_000,
});
}
const ACTIVE: DownloadStatus[] = ["queued", "submitting", "downloading", "importing", "stalled"];
export function useDownloadTasks(f: DownloadFilters) {