feat(metadata): field-level episode metadata, titleZh and refresh?full=1 (MD-1)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
fc1856c2e3
commit
9cd5a28943
12 files changed
+1104
-27
No files matched your search
@@ -346,6 +346,33 @@ describe.skipIf(!up)("两阶段搜索(SEARCH-2)", () => {
|
||||
expect(counts()).toEqual(before);
|
||||
});
|
||||
|
||||
it("MD-1 GET /media/tmdb/tv/{id}(语言回退链)与 /season/{n}(每集信息)", async () => {
|
||||
const d = await req(`/media/tmdb/tv/95396`);
|
||||
expect(d.status).toBe(200);
|
||||
expect(d.body.data).toMatchObject({
|
||||
title: "人生切割术",
|
||||
titleZh: "人生切割术",
|
||||
overview: "故事发生在一家名为卢蒙的超级大公司内。",
|
||||
genres: ["剧情", "悬疑", "Sci-Fi & Fantasy"],
|
||||
voteAverage: 8.4,
|
||||
airStatus: "Returning Series",
|
||||
platform: "Apple TV",
|
||||
backdropPath: "/severance-bg.jpg",
|
||||
});
|
||||
expect(d.body.data.cast[0]).toMatchObject({ name: "亚当·斯科特", role: "Mark Scout", profilePath: "/adam.jpg" });
|
||||
expect(d.body.data.seasons[0]).toMatchObject({ seasonNumber: 1, posterPath: "/sev-s1.jpg" });
|
||||
|
||||
const s1 = await req(`/media/tmdb/tv/95396/season/1`);
|
||||
expect(s1.status).toBe(200);
|
||||
expect(s1.body.data.episodes.map((e: Loose) => [e.episodeNumber, e.name, e.nameLanguage])).toEqual([
|
||||
[1, "有关地狱的好消息", "zh-CN"],
|
||||
[2, "半循環", "zh-TW"],
|
||||
[3, "In Perpetuity", "en-US"],
|
||||
]);
|
||||
expect(s1.body.data.episodes[0]).toMatchObject({ runtime: 59, stillPath: "/sev-101.jpg", voteAverage: 8.2 });
|
||||
expect((await req(`/media/tmdb/tv/95396/season/9`)).status).toBe(404);
|
||||
});
|
||||
|
||||
it("GET /inventory/media-servers 可按 TMDB 条目查(未建档时 mediaEntityId = null)", async () => {
|
||||
const r = await req(`/inventory/media-servers?tmdbType=movie&tmdbId=872585`);
|
||||
expect(r.status).toBe(200);
|
||||
|
||||
Reference in new issue
Block a user