fix(gallery): 归档补漏改按 item 级 url 判定(条目本身没有 url,原判定恒为待补 → 重复入库)
This commit is contained in:
1 parent
7caa564ea1
commit
aa9a54cdc2
2 files changed
+6
-2
No files matched your search
@@ -3938,7 +3938,11 @@ try { if (window.IWBMiniMapFit && typeof window.IWBMiniMapFit.install === 'funct
|
||||
const pendingEntries = all.filter((e) => {
|
||||
const archived = !!(wGallerySync && wGallerySync.wasArchived(e))
|
||||
if (!archived) return true
|
||||
return !_urlInIdx.has(String((e && e.url) || ''))
|
||||
// 条目形状是 {promptId,vi,label,items:[{ok,url}]},**没有 e.url** —— 必须下沉到 item 级取 url。
|
||||
// 只要有任一 item 的 url 不在图库索引里才补;全都在索引里就跳过(否则会重复入库)。
|
||||
const urls = flattenGenerationEntries([e]).map((i) => String((i && i.url) || '')).filter(Boolean)
|
||||
if (!urls.length) return false
|
||||
return urls.some((u) => !_urlInIdx.has(u))
|
||||
})
|
||||
try { wIngestLog('archive entries=' + all.length + ' pending=' + pendingEntries.length) } catch (eL1) { /* ignore */ }
|
||||
for (const hook of wPluginGenHooks) {
|
||||
|
||||
Reference in new issue
Block a user