fix(sites): normalize HHClub RSS items, complete detail page parsing (HH-2)
- RSS: split NexusPHP "[category]name[subtitle][size][uploader]" titles in the site adapter layer (category id/name/media type, clean title, subtitle, size); snapshot fields win on merge; lazily renormalize old RSS rows and re-emit release.observed; unknown list fields show an em dash - Detail: HHClub section layout (douban info block as description, screenshots section, IMDb/TMDB from MediaInfo lines, upload time field, on-demand viewfilelist.php once); site CDN screenshots get a Referer - Site request count now includes site-bound RSS fetches - Origin view shows "自动化" when idle and "Agent" only after recent automation actions (lastAutomationAt); agent step titles no longer get squeezed to a sliver by long notes Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
4a212ed19e
commit
cabd772243
32 files changed
+816
-65
No files matched your search
@@ -18,9 +18,12 @@ export function looksLikeMediaInfo(text: string): boolean {
|
||||
return (text.match(/^[^\n::]{2,40}[ \t]*[::][ \t]*\S/gm) ?? []).length >= 5;
|
||||
}
|
||||
|
||||
/** TMDB:themoviedb.org 链接,或 MediaInfo / 简介里的「TMDB : tv/294990」一行 */
|
||||
export function extractTmdb(text: string | null | undefined): SiteDetailPage["tmdb"] {
|
||||
const m = text ? /themoviedb\.org\/(movie|tv)\/(\d+)/.exec(text) : null;
|
||||
return m ? { type: m[1] as "movie" | "tv", id: m[2]! } : null;
|
||||
const m = text
|
||||
? (/themoviedb\.org\/(movie|tv)\/(\d+)/.exec(text) ?? /\bTMDB\s*(?:ID)?\s*[::]\s*(movie|tv)\/(\d+)/i.exec(text))
|
||||
: null;
|
||||
return m ? { type: m[1]!.toLowerCase() as "movie" | "tv", id: m[2]! } : null;
|
||||
}
|
||||
|
||||
/** 图片地址转绝对 http(s) 地址并过滤非截图;无效返回 null */
|
||||
|
||||
Reference in new issue
Block a user