feat(library): show stored versions per episode and movie (LIBV-1)
- domain versionSpecOf: file name + ffprobe + ingest quality -> version spec;
summarizeVersions; matchVersions (satisfied / missing / upgradeable, single target)
- GET /library/{id}/versions: per-season/episode versions, summaries, matches[]
- organize writes full spec into media_asset.delivery (specVersion 1)
- scripts/asset-spec-backfill.ts: dry-run by default, --probe local only, --apply
- web: season summary line, one-line spec per episode, N versions expand,
tech info details (TODO: DEAI-2 TechInfo), movie versions panel
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
3763c86481
commit
bf9e73e86e
19 files changed
+2060
-9
No files matched your search
@@ -0,0 +1,18 @@
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import { LibraryVersions } from "@umt/contracts";
|
||||
import { getParsed } from "~/api/library.ts";
|
||||
|
||||
// LIBV-1:作品的入库版本(每集的本地文件版本、季汇总、与收录版本的比对)
|
||||
|
||||
export const libraryVersionKeys = {
|
||||
versions: (id: string, slotId?: string) => ["library", "versions", id, slotId ?? null] as const,
|
||||
};
|
||||
|
||||
export function useLibraryVersions(id: string | undefined, slotId?: string) {
|
||||
return useQuery({
|
||||
queryKey: libraryVersionKeys.versions(id ?? "", slotId),
|
||||
enabled: !!id,
|
||||
queryFn: ({ signal }) =>
|
||||
getParsed(LibraryVersions, `/library/${id}/versions`, slotId ? { slotId } : undefined, signal),
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user