thumbs: a changed `preview:` pin or source URL never refreshes the stored image, and a source that keeps failing keeps its old image forever
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 57/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- javascript
研究方向
Start with site/lib/thumbs.mjs around needsFetch() (117–124), then read the fetch failure and prune paths in site/thumbs.mjs (218–248) and the validator note in site/checks.mjs (798–800). Run the relevant cases in lib.test.mjs and a dry run with a changed preview: pin. Done means source and pin changes trigger fetching, repeated failures eventually drop stale records and files, and each manifest source matches its entry URL.
由索引模型根據 Issue 內容生成。
描述
Why it matters
site/thumbs.json decides which publisher image the site shows. If a contributor repoints preview: at a better image, or an entry's url moves, the old picture stays on the entry page, the card and the hero filmstrip for up to 180 days. If a source starts returning 404, the old image is republished at every build with no expiry at all.
Evidence (at 69387df)
site/lib/thumbs.mjs:117-124needsFetch()compares onlyrecord.licenseandrecord.fetched. Verified: a record whosesourceandimagediffer from the entry still returnsfalsewhen the licence matches andfetchedis recent.source,imageandpinnedare stored (site/thumbs.mjs:138-139) but never read back.site/thumbs.mjs:218-227: on a fetch failure the old record and.webpare kept; the prune at 245-248 only removes files with no record. Nothing counts consecutive failures.site/checks.mjs:798-800says the record "is otherwise not compared with the entry", so the validator will not catch it.
Suggested approach
In needsFetch, also return true when record.source !== entry.url, when the pinned flag no longer matches whether preview: is an https:// URL, or when a pinned record's image !== entry.preview. Add a failures counter (or lastTried) to the record; after N failed runs, or when fetched is older than 2 x maxAgeDays, drop the record and file so the tile falls back to the typographic one, and report the drop in the run summary. A one-line validator check can enforce record.source === entry.url.
Done when
lib.test.mjs covers "source changed", "pin added/removed/changed" and "stale after repeated failure"; a dry run with a repointed preview: lists that entry under Fetched; the manifest's source always equals the entry's url.
- 主要語言
- JavaScript
- 星號
- 58
- 分支
- 15
- 平均合併
- 16 小時 53 分鐘
- 30 天內合併 PR
- 14
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
TMHSDigital/Free-Game-Dev-Assets 的其他 Issue
-
community marketing priority: low
難度 2/5 1-3 小時 新手友好度 72/100
TMHSDigital/Free-Game-Dev-Assets#151 ·
維護者通常 1 天內回覆
-
documentation priority: medium
難度 2/5 1-3 小時 新手友好度 78/100
TMHSDigital/Free-Game-Dev-Assets#72 ·
維護者通常 1 天內回覆
-
enhancement
難度 1/5 1-3 小時 新手友好度 68/100
TMHSDigital/Free-Game-Dev-Assets#3 · 1 則留言 ·
維護者通常 1 天內回覆
-
marketing priority: low
難度 2/5 1-3 小時 新手友好度 55/100
TMHSDigital/Free-Game-Dev-Assets#152 ·
維護者通常 1 天內回覆
-
feature priority: medium
難度 5/5 一週以上 新手友好度 25/100
TMHSDigital/Free-Game-Dev-Assets#144 ·
維護者通常 1 天內回覆
查看 TMHSDigital/Free-Game-Dev-Assets 的全部 Issue
相似的 Issue
-
難度 1/5 1 小時以內 新手友好度 85/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 72/100
vercel-labs/agent-skills#348 ·
-
難度 2/5 1-3 小時 新手友好度 65/100
NanmiCoder/dsh-agent-teams#289 ·
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 70/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 83/100
c1overzz/dsh-bili-scroll#124 ·
維護者通常 1 天內回覆