feat(web): 刮削设置与对话框加「更新」覆盖方式,内容没变的跳过不逐条列出
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Cxwgnn2pbzQ7rXv3rq7fei
This commit is contained in:
1 parent
37cf0a398e
commit
4306bff6d3
4 files changed
+15
-7
No files matched your search
@@ -57,10 +57,11 @@ const SCRAPE_CARD: CardSpec = {
|
||||
label: "已有文件",
|
||||
kind: "select",
|
||||
options: [
|
||||
{ value: "update", label: "更新" },
|
||||
{ value: "missing", label: "只补缺失" },
|
||||
{ value: "overwrite", label: "全部覆盖" },
|
||||
],
|
||||
hint: "全部覆盖会替换目录里已有的 NFO 和图片,包括其他工具写的",
|
||||
hint: "更新只替换本工具写过、之后没被改过的文件;全部覆盖会替换目录里已有的 NFO 和图片,包括其他工具写的",
|
||||
},
|
||||
{
|
||||
name: "organize.scrapeImages",
|
||||
@@ -84,13 +85,16 @@ const SCRAPE_CARD: CardSpec = {
|
||||
toPatch: (v) => ({
|
||||
organize: {
|
||||
scrapeAfterImport: v["organize.scrapeAfterImport"] === true,
|
||||
scrapeMode: str(v["organize.scrapeMode"]) === "overwrite" ? "overwrite" : "missing",
|
||||
scrapeMode: scrapeModeOf(str(v["organize.scrapeMode"])),
|
||||
scrapeImages: v["organize.scrapeImages"] === true,
|
||||
scrapeEpisodeThumbs: v["organize.scrapeEpisodeThumbs"] === true,
|
||||
},
|
||||
}),
|
||||
};
|
||||
|
||||
const scrapeModeOf = (v: string | null | undefined): "missing" | "overwrite" | "update" =>
|
||||
v === "overwrite" || v === "missing" ? v : "update";
|
||||
|
||||
export function LibrarySection() {
|
||||
return (
|
||||
<div className="grid grid-cols-1 gap-8">
|
||||
|
||||
Reference in new issue
Block a user