Merge branch 'detail1'
Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
commit
3067b668d8
16 files changed
+1992
-175
No files matched your search
@@ -1,4 +1,4 @@
|
||||
import type { SiteDetailPage } from "@umt/adapters";
|
||||
import { formatDetailPage, type SiteDetailPage } from "@umt/adapters";
|
||||
import type { SiteReleasePage } from "@umt/contracts";
|
||||
import { sql } from "@umt/db";
|
||||
import { sharedCache, storageSettings } from "../../../shared-cache.ts";
|
||||
@@ -99,6 +99,12 @@ export async function detailScreenshotRequest(
|
||||
export async function loadDetailPage(rt: SourcesRuntime, srId: string): Promise<SiteReleasePage | null> {
|
||||
const p = await loadStored(rt, srId);
|
||||
if (!p) return null;
|
||||
// 展示结构每次现算:旧缓存也能用,解析规则改了不必清缓存
|
||||
const formatted = formatDetailPage({
|
||||
descriptionText: p.descriptionText ?? null,
|
||||
mediaInfo: p.mediaInfo ?? null,
|
||||
files: p.files ?? [],
|
||||
});
|
||||
return {
|
||||
fetchedAt: p.fetchedAt,
|
||||
descriptionText: p.descriptionText,
|
||||
@@ -118,6 +124,7 @@ export async function loadDetailPage(rt: SourcesRuntime, srId: string): Promise<
|
||||
files: p.files,
|
||||
tags: p.tags,
|
||||
uploader: p.uploader,
|
||||
...formatted,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user