Merge branch 'detail1'
Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
commit
3067b668d8
16 files changed
+1992
-175
No files matched your search
@@ -636,6 +636,60 @@ export const WorkbenchReleasePage = z.object({
|
||||
});
|
||||
export type WorkbenchReleasePage = z.infer<typeof WorkbenchReleasePage>;
|
||||
|
||||
/** MediaInfo / BDInfo 概要;字段认不出为 null */
|
||||
export const SiteMediaSummary = z.object({
|
||||
kind: z.enum(["mediainfo", "bdinfo"]),
|
||||
general: z.object({
|
||||
fileName: z.string().nullable(),
|
||||
container: z.string().nullable(),
|
||||
duration: z.string().nullable(),
|
||||
overallBitrate: z.string().nullable(),
|
||||
size: z.string().nullable(),
|
||||
}),
|
||||
video: z.array(
|
||||
z.object({
|
||||
codec: z.string().nullable(),
|
||||
resolution: z.string().nullable(),
|
||||
frameRate: z.string().nullable(),
|
||||
bitrate: z.string().nullable(),
|
||||
bitDepth: z.string().nullable(),
|
||||
hdr: z.array(z.string()),
|
||||
}),
|
||||
),
|
||||
audio: z.array(
|
||||
z.object({
|
||||
language: z.string().nullable(),
|
||||
codec: z.string().nullable(),
|
||||
channels: z.string().nullable(),
|
||||
bitrate: z.string().nullable(),
|
||||
title: z.string().nullable(),
|
||||
isDefault: z.boolean().nullable(),
|
||||
}),
|
||||
),
|
||||
subtitles: z.array(
|
||||
z.object({
|
||||
language: z.string().nullable(),
|
||||
format: z.string().nullable(),
|
||||
title: z.string().nullable(),
|
||||
isDefault: z.boolean().nullable(),
|
||||
forced: z.boolean().nullable(),
|
||||
}),
|
||||
),
|
||||
});
|
||||
export type SiteMediaSummary = z.infer<typeof SiteMediaSummary>;
|
||||
|
||||
/** 文件目录树(先序展平,按 depth 缩进);role:主视频 / sample / 字幕 / 附件 / 其他视频 / 其他,目录为 null */
|
||||
export const SiteFileTreeRow = z.object({
|
||||
path: z.string(),
|
||||
name: z.string(),
|
||||
depth: z.number().int(),
|
||||
dir: z.boolean(),
|
||||
sizeBytes: z.number().int().nullable(),
|
||||
role: z.enum(["main", "sample", "subtitle", "extra", "video", "other"]).nullable(),
|
||||
fileCount: z.number().int().nullable(),
|
||||
});
|
||||
export type SiteFileTreeRow = z.infer<typeof SiteFileTreeRow>;
|
||||
|
||||
/**
|
||||
* 站点详情页扩展内容(按需抓详情时得到,服务端缓存 24 小时;过期后需再次复核详情)。
|
||||
* 截图地址是服务端图片代理路径(/api/v1/img/site-detail/{releaseId}/{index}),不直连外站。
|
||||
@@ -651,6 +705,11 @@ export const SiteReleasePage = z.object({
|
||||
files: z.array(z.object({ name: z.string(), sizeBytes: z.number().int().nullable() })),
|
||||
tags: z.array(z.string()),
|
||||
uploader: z.string().nullable(),
|
||||
/** 展示结构(读缓存时由上面的原文现算):信息块、正文段落、技术规格概要、文件目录树 */
|
||||
infoBlock: z.array(z.object({ key: z.string(), value: z.string() })),
|
||||
paragraphs: z.array(z.string()),
|
||||
media: SiteMediaSummary.nullable(),
|
||||
fileTree: z.array(SiteFileTreeRow),
|
||||
});
|
||||
export type SiteReleasePage = z.infer<typeof SiteReleasePage>;
|
||||
|
||||
|
||||
Reference in new issue
Block a user