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

@@ -1467,6 +1467,18 @@
"mp": null,
"ours": "swtyblz",
"note": "未知发布组兜底(末段 -GROUP / 开头方括号),MP 组表未命中为 None"
},
"name": {
"kind": "intentional",
"mp": "thematrix",
"ours": "黑客帝国",
"note": "ID-2:副标题第一段的中文片名补作中文名(MP 副标题只取季集),见 docs/porting/moviepilot-identity-match.md"
},
"cn_name": {
"kind": "intentional",
"mp": null,
"ours": "黑客帝国",
"note": "ID-2:副标题第一段的中文片名补作中文名(MP 副标题只取季集),见 docs/porting/moviepilot-identity-match.md"
}
},
"Z-17": {
@@ -1554,6 +1566,48 @@
"ours": "douban:35593344",
"note": "MP 不认 {doubanid=..} 花括号写法,我们认"
}
},
"MP-61": {
"name": {
"kind": "intentional",
"mp": "iwokeupavampire",
"ours": "醒来变成吸血鬼",
"note": "ID-2:副标题第一段的中文片名补作中文名(MP 副标题只取季集),见 docs/porting/moviepilot-identity-match.md"
},
"cn_name": {
"kind": "intentional",
"mp": null,
"ours": "醒来变成吸血鬼",
"note": "ID-2:副标题第一段的中文片名补作中文名(MP 副标题只取季集),见 docs/porting/moviepilot-identity-match.md"
}
},
"MP-62": {
"name": {
"kind": "intentional",
"mp": "shadowsofthevoid",
"ours": "虚无边境",
"note": "ID-2:副标题第一段的中文片名补作中文名(MP 副标题只取季集),见 docs/porting/moviepilot-identity-match.md"
},
"cn_name": {
"kind": "intentional",
"mp": null,
"ours": "虚无边境",
"note": "ID-2:副标题第一段的中文片名补作中文名(MP 副标题只取季集),见 docs/porting/moviepilot-identity-match.md"
}
},
"Z-15": {
"name": {
"kind": "intentional",
"mp": "duneparttwo",
"ours": "沙丘2",
"note": "ID-2:副标题第一段的中文片名补作中文名(MP 副标题只取季集),见 docs/porting/moviepilot-identity-match.md"
},
"cn_name": {
"kind": "intentional",
"mp": null,
"ours": "沙丘2",
"note": "ID-2:副标题第一段的中文片名补作中文名(MP 副标题只取季集),见 docs/porting/moviepilot-identity-match.md"
}
}
}
}
+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);
});
}