Merge branch 'id3'
Co-Authored-By: Claude Fable 5.1 <[email protected]> # Conflicts: # CHANGELOG.md
This commit is contained in:
commit
a9511a75f6
23 files changed
+1320
-14
No files matched your search
@@ -86,6 +86,13 @@ export interface MatchOptions {
|
||||
* rankCandidates / resolveIdentity 按池自动计算;单独调用 scoreCandidate 时可传入。
|
||||
*/
|
||||
genericNames?: ReadonlySet<string>;
|
||||
/**
|
||||
* ID-3:站点列表 / 详情页给出的外部 ID(IMDb / TMDB)。候选按这些 ID 取来(或已登记同一 ID)时视为同一作品的强证据:
|
||||
* 标题对不上也至少 multi_evidence(可自动确认);年份冲突降为 needs_confirm(ID 可能挂错,只作候选);
|
||||
* 续作序号冲突 / 类型冲突不放宽。对照 MP search/result.py `_match_source`:种子的 IMDb ID 与作品一致即判为命中,不再比标题。
|
||||
* 标题里的 `[tmdbid=…]` 不算(仍按 explicit_id 只提升一级)。
|
||||
*/
|
||||
trustedIds?: readonly { provider: string; id: string }[];
|
||||
}
|
||||
|
||||
/** 池里撞名的阈值:单个拉丁词被 ≥ 3 个候选的名称包含 */
|
||||
@@ -293,6 +300,19 @@ export function scoreCandidate(p: ParsedRelease, c: IdentityCandidate, opts: Mat
|
||||
evidence.push("type_conflict");
|
||||
}
|
||||
if (explicit && level !== "rejected" && tm !== "none") level = raise(level);
|
||||
const trusted =
|
||||
opts.trustedIds?.some(
|
||||
(x) =>
|
||||
(x.provider === c.provider && x.id === c.externalId) ||
|
||||
c.linkedExternalIds?.some((l) => l.provider === x.provider && l.id === x.id),
|
||||
) ?? false;
|
||||
if (trusted && sequel !== "conflict" && ty !== "mismatch") {
|
||||
evidence.push("site_id");
|
||||
if (ym === "mismatch") {
|
||||
level = "needs_confirm";
|
||||
evidence.push("site_id_year_conflict");
|
||||
} else if (LEVEL_RANK[level] < LEVEL_RANK.multi_evidence) level = "multi_evidence";
|
||||
}
|
||||
return {
|
||||
candidate: c,
|
||||
level,
|
||||
|
||||
Reference in new issue
Block a user