fix(identify): rank TMDB candidates by original title too
catalog.lookup only returned the zh-CN localized title, so an English release name (Dune.Part.Two.2024...) was rejected against "沙丘2" and files/identify came back with zero candidates. Pass originalTitle through catalog.lookup and use it as an extra title in ranking. Found in REAL-1b on the v0.2.2 test stack; needs an image rebuild to take effect. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
1de131b192
commit
775344f597
3 files changed
+7
-1
No files matched your search
@@ -318,6 +318,7 @@ async function identifyCore(
|
||||
entityType: string;
|
||||
externalId: string;
|
||||
title: string;
|
||||
originalTitle?: string | null;
|
||||
year: number | null;
|
||||
posterPath?: string | null;
|
||||
}[];
|
||||
@@ -329,7 +330,8 @@ async function identifyCore(
|
||||
provider: m.provider,
|
||||
entityType: m.entityType as "movie" | "tv",
|
||||
externalId: m.externalId,
|
||||
titles: [m.title],
|
||||
// 本地化标题(zh-CN)配不上英文文件名,原名也作标题参与排序
|
||||
titles: m.originalTitle && m.originalTitle !== m.title ? [m.title, m.originalTitle] : [m.title],
|
||||
...(m.year !== null ? { year: m.year } : {}),
|
||||
aliases: [],
|
||||
}));
|
||||
|
||||
@@ -53,6 +53,7 @@ export function registerSourcesCapabilities(registry: CapabilityRegistry, rt: ()
|
||||
entityType: ExternalEntityType;
|
||||
externalId: string;
|
||||
title: string;
|
||||
originalTitle?: string | null;
|
||||
year: number | null;
|
||||
posterPath?: string | null;
|
||||
}[] = [];
|
||||
@@ -66,6 +67,7 @@ export function registerSourcesCapabilities(registry: CapabilityRegistry, rt: ()
|
||||
entityType: m.entityType,
|
||||
externalId: m.externalId,
|
||||
title: m.title,
|
||||
originalTitle: m.originalTitle,
|
||||
year: m.year,
|
||||
posterPath: m.posterPath,
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user