feat(sites): on-demand site detail page content (INT-2)

- SiteReleaseDetail.page: description, MediaInfo/BDInfo, screenshots,
  IMDb / Douban / TMDB ids, file list, tags, uploader, plus a parse probe
  (labels found) for layout-change diagnosis. Generic NexusPHP rules
  (field label -> next sibling) starting from the MovieClaw detail
  selectors; site overrides under umt.detail.page (HHClub: div labels).
  M-Team builds the same structure from descr BBCode + mediainfo.
- Fetched only on demand (drawer open without cache, "复核详情",
  release.inspect); content in kv_cache region site.detail for the
  site detail cache period (>= 24 h); within the window the site is not
  requested again. External ids persist in source_release.raw._detail,
  which list snapshots do not overwrite.
- Screenshots only as proxy paths /api/v1/img/site-detail/{rid}/{i}:
  public-address check on every hop, no site credentials, magic-byte
  image check, 8 MB cap. Poster proxy shares the same helper.
- Identity: site ids count as explicit-id evidence; when TMDB is
  queried, a TMDB id goes straight to details and an IMDb id to
  /find (no title search on a hit). Douban only for local recall.
- Release drawer "站点详情页" section; fixtures and tests for HHClub div
  layout, rowhead layout, BBCode, cache/proxy/identity end to end.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
rootandClaude Opus 5.5 committed 2026-09-29 16:21:17 +08:00
1 parent 6e9e8efec2
commit 04cffcd1f1
30 files changed
+1133 -64

No files matched your search

@@ -11,6 +11,7 @@
*/
import { redactUrl } from "../../rss/redact.ts";
import { buildHttpContext, type SiteAdapterDeps } from "../deps.ts";
import { pageFromBbcode } from "../detail-text.ts";
import { readBody, siteFetch } from "../http.ts";
import { healthFromError } from "../spider/adapter.ts";
import { promotionFromFactors } from "../spider/map.ts";
@@ -154,6 +155,12 @@ export function createMteamAdapter(input: MteamDefinition, deps: SiteAdapterDeps
const [row] = parseMteamResult([data], def.domain);
const r: SiteReleaseDetail = mteamTorrentToRelease(row!, data, def, http.now().toISOString());
if (data.descr) r.descriptionText = String(data.descr).slice(0, 20_000);
r.page = pageFromBbcode(data.descr, def.domain, {
mediaInfo: typeof data.mediainfo === "string" ? data.mediainfo : null,
imdbId: r.imdbId ?? null,
doubanId: r.doubanId ?? null,
tags: r.tags,
});
return r;
},
@@ -46,6 +46,7 @@ export interface MteamTorrentJson {
labels?: string | number | null;
labelsNew?: string[] | null;
descr?: string | null;
mediainfo?: string | null;
status?: {
seeders?: string | number | null;
leechers?: string | number | null;