feat(identity): source-aware short-drama enrichment with snippet mode and hit rate (META-2)

- classify enrich sources: encyclopedia, platform pages (hongguo, kuaikaw, video
  platforms), douban (search snippet only) and other sites' search snippets
  (snippet mode, pages never opened); one extractor per source, fields carry
  source kind and confidence, merged by noisy-OR across hosts
- new cast field (applied as MediaCredit with placeholder ids)
- robots.txt check (cached per host 1 day) and login-wall/captcha give-up
- per-enrichment source attempts + GET /identity/enrich-stats, 30-day hit-rate
  table under settings -> metadata -> identity
- setting identity.enrichSnippetAllSites (default on); default domains add
  baike.com and kuaikaw.cn
- replay fixtures from the real run on the 4 user-library short dramas
  (sanitized Brave responses, hongguo page, robots.txt)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
rootandClaude Opus 5.5 committed 2026-09-30 18:40:19 +08:00
1 parent 081db4651c
commit 9489e40e0c
23 files changed
+2615 -323

No files matched your search

+13 -8
View File
@@ -246,14 +246,19 @@ export function CreditsStrip({ cast, crew }: { cast: MediaCredit[]; crew: MediaC
{people.map((p) => (
<li key={p.key} className="flex w-20 shrink-0 flex-col items-center text-center">
<Avatar path={p.profilePath} name={p.name} />
<a
href={`https://www.themoviedb.org/person/${p.id}`}
target="_blank"
rel="noreferrer noopener"
className="mt-1.5 line-clamp-2 text-meta font-medium break-words text-foreground hover:underline"
>
{p.name}
</a>
{p.id > 0 ? (
<a
href={`https://www.themoviedb.org/person/${p.id}`}
target="_blank"
rel="noreferrer noopener"
className="mt-1.5 line-clamp-2 text-meta font-medium break-words text-foreground hover:underline"
>
{p.name}
</a>
) : (
// 元数据补全写的主演没有 TMDB 人物 ID(负数占位),不链接
<span className="mt-1.5 line-clamp-2 text-meta font-medium break-words text-foreground">{p.name}</span>
)}
{p.role ? <span className="line-clamp-2 text-micro break-words text-muted-foreground">{p.role}</span> : null}
</li>
))}