feat(album): 相册文件夹模式 + 固化可靠性修复(v1.2.0)
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 41s
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 41s
宿主: - wCleanIdb 保留集改为递归整个 node.data(原只扫 data/url/result,漏 items[].src ⇒ 固化后的 blob 被当孤儿删,实测 18 个条目丢 16 个) - 收藏组同步修复;新增 tests/idb-gc-plugin-refs-test.js 防回退 插件 album 1.2.0: - 来源徽标(已固化/引用/网络/丢失) - 固化计数只算本地路径引用,批量跳过已固化并提示 - 单删/清空时清理 ctx.files 缩略图 - 文件夹模式:单图任务 + 文件夹监控两个开关、模式说明、按模式隐藏控件、刷新(增量 diff)、全部重载(二次确认)、忽略名单 folderSkip、底部路径与已忽略计数 计划与复盘:docs/plans/album-folder-mode.md(含勾选状态与优化总结)
This commit is contained in:
1 parent
03191d24dc
commit
a4dc50ed5e
10 files changed
+289
-25
No files matched your search
@@ -2824,10 +2824,9 @@ try { if (window.IWBMiniMapFit && typeof window.IWBMiniMapFit.install === 'funct
|
||||
for (const k of Object.keys(value)) collect(value[k])
|
||||
}
|
||||
}
|
||||
for (const w of (ws && ws.workspaces) || []) for (const n of (w && w.nodes) || []) {
|
||||
const d = (n && n.data) || {}
|
||||
for (const f of ['data', 'url', 'result']) collect(d[f])
|
||||
}
|
||||
// v3.26.116:**递归整个 node.data**。原来只扫 data/url/result,漏掉插件节点里的图片引用
|
||||
// (相册 data.items[].src)⇒ 固化后的 {__blob} 被当孤儿删掉,重开只剩缩略图(实测 18 个里丢 16 个)。
|
||||
for (const w of (ws && ws.workspaces) || []) for (const n of (w && w.nodes) || []) collect((n && n.data) || {})
|
||||
// 出图缩略图/原图:保留 outputs 索引中仍在的(随保留策略删除的索引 → 孤儿一并回收)
|
||||
const oidx = lsGet(OUT_KEY, [])
|
||||
for (const f of oidx) { if (f && f.idb) keep.add(f.idb); if (f && f.origIdb) keep.add(f.origIdb) }
|
||||
@@ -2850,7 +2849,7 @@ try { if (window.IWBMiniMapFit && typeof window.IWBMiniMapFit.install === 'funct
|
||||
// 否则会被当孤儿回收、实例化出来的组图空白。放在节流之后:只有真要扫库时才读一次收藏组。
|
||||
try {
|
||||
const savedGroups = lsGet(StorageContract.localKeys.groups, []) || []
|
||||
for (const g of savedGroups) for (const n of ((g && g.nodes) || [])) { const d = (n && n.data) || {}; collect(d.data); collect(d.url) }
|
||||
for (const g of savedGroups) for (const n of ((g && g.nodes) || [])) collect((n && n.data) || {})
|
||||
} catch (e) { /* 读取失败不影响清理 */ }
|
||||
const keys = await IDB.keys()
|
||||
for (const k of keys) {
|
||||
|
||||
Reference in new issue
Block a user