feat(media): 新增清晰度与帧图查询接口

This commit is contained in:
Zhou Weidong committed 2026-10-22 14:14:13 +08:00
1 parent 090f149b31
commit 345408d5e7
18 files changed
+887 -31

No files matched your search

+51
View File
@@ -25339,3 +25339,54 @@ $ mvn -pl fruitshorts-module-media test
`spring-boot-starter-test` test scope,使指定门禁能实际执行本次单元测试。
下一步实现 VTT 解析、稳定排序、分页和 admin 聚合 VO 后转绿。
### 实现
- 新增 `MediaTranscodeOutputService`:媒体存在性校验、rendition 稳定倒序、
VTT 读取与 cue 分页、签名后的 sprite/VTT/HLS 地址。
- 新增 `ThumbnailVttParser`:解析多 sprite 文件、毫秒时间与 xywh 矩形。
- `GET /admin/media/{id}/renditions` 返回强类型清晰度列表;媒体不存在使用
`DATA_NOT_FOUND`。
- `GET /admin/media/{id}/thumbnails` 默认 `pageIndex=1/pageSize=100`,
`pageSize` 上限 500;无记录返回 `EMPTY`,不抛错。
- `GET /admin/episodes/{id}/transcode` 聚合任务、rendition 与缩略图;
分集不存在、无视频、无媒资、无任务分别返回明确 status。
- `/admin/dashboard/transcode` 改为 `TranscodeDashboardRespVO`,queue 增加 total;
failedTasks 也使用明确任务 VO。
- 新响应 VO 均带 `@Schema`,Controller 使用 `Result<T>` / `PageResult<T>`,
新接口不再返回 Map/Object。
### 测试
```text
$ mvn -pl fruitshorts-module-media test
[INFO] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0
[INFO] BUILD SUCCESS
```
补充 admin-api 与依赖模块全量测试:
```text
$ mvn -pl fruitshorts-admin-api -am test
[INFO] Tests run: 51, Failures: 0, Errors: 0, Skipped: 0
[INFO] fruitshorts-admin-api .............................. SUCCESS
[INFO] BUILD SUCCESS
```
解读:清晰度排序、VTT 多 sprite 解析、帧图分页与 500 上限、空产物状态、
媒体不存在、分集不存在/无视频、dashboard 强类型响应均通过。
最终指定门禁再次运行仍为 8/8 通过。
未启停服务、未执行数据库变更、未修改 `/app`、Web、Flutter、specs 或 API 文档。
补跑全仓回归:
```text
$ mvn test
[INFO] fruitshorts-admin-api .............................. SUCCESS
[INFO] fruitshorts-app-api ................................ SUCCESS
[INFO] fruitshorts-transcode-worker ....................... SUCCESS
[INFO] BUILD SUCCESS
```
解读:admin 51、app 109、worker 32 个测试均通过,P1 入队/重转与 worker
链路未回归。