feat(parser): site category prefix, RSS embedded description and subtitle titles (ID-2)

Strip [电视剧]/[动漫]/[音乐]… prefixes into parsed.category instead of titleCn,
split RSS-embedded site descriptions into the subtitle, take the first Chinese
name of the subtitle as titleCn and the rest as altTitles, and stop reading
'Travis - 12 Memories' as episode 12. PARSER_VERSION 2.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
rootandClaude Opus 5.5 committed 2026-09-29 17:41:22 +08:00
1 parent c3aaf901ad
commit 51e0032d14
6 files changed
+195 -18

No files matched your search

+8 -2
View File
@@ -566,7 +566,13 @@ const MP_PARITY: Sample[] = [
subtitle: "麦香 | 全36集 | 4K",
expect: { titleCn: "麦香", title: "麦香" },
},
{ id: "M4b", input: "Blade Runner 2017 1080p WEB-DL", subtitle: "银翼杀手 | 科幻", expect: { titleCn: undefined } },
// ID-2:副标题第一段的中文片名补作中文名(M4b 原先断言不取)
{
id: "M4b",
input: "Blade Runner 2017 1080p WEB-DL",
subtitle: "银翼杀手 | 科幻",
expect: { titleCn: "银翼杀手", titleEn: "Blade Runner" },
},
{ id: "M5", input: "Thor Love and Thunder (2022) [1080p] [WEBRip] [5.1]", expect: { audio: ["5.1"] } },
{
id: "M6",
@@ -629,7 +635,7 @@ describe("parseRelease 样本表", () => {
it(`${s.id} ${s.input}${s.deviation ? ` [deviation: ${s.deviation}]` : ""}`, () => {
const r = parseRelease(s.input, s.subtitle ? { subtitle: s.subtitle } : {});
check(r, s.expect);
expect(r.parserVersion).toBe(1);
expect(r.parserVersion).toBe(2);
expect(r.raw).toBe(s.input);
});
}