dsh-folia 4.0.3 → 4.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -258,7 +258,9 @@ function foliaItemFromCatalog(it, base) {
258
258
  // 预览优先级:**站点自己给的 preview 最高**(省掉宿主这一跳,也最省流量);
259
259
  // 站点没给才退回宿主缩略图代理。只有预览走小图,`media` 永远是原图 ——
260
260
  // 应用壁纸用的是 `media`,所以画质不受影响。
261
- const sitePreview = foliaAbs(base, it && (it.preview || it.poster)) || null;
261
+ // 站点后台已经自动生成缩略图(thumbUrl,webp 小图),优先用它 ——
262
+ // 比宿主自己 ffmpeg 生成更快(少一跳),也比你手传更省事。
263
+ const sitePreview = foliaAbs(base, it && (it.thumbUrl || it.preview || it.poster)) || null;
262
264
  const thumb = sitePreview ? null : (type === 'image' ? '/folia/site-thumb?u=' + encodeURIComponent(media) : null);
263
265
  const extHit = String(media).match(/\.([a-z0-9]{2,5})(?:[?#]|$)/i);
264
266
  const num = (v) => (Number.isFinite(Number(v)) && Number(v) > 0 ? Number(v) : undefined);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-folia",
3
- "version": "4.0.3",
3
+ "version": "4.0.4",
4
4
  "description": "Folia 壁纸引擎:把本机 Wallpaper Engine 壁纸搬进 DSH 界面(场景实时渲染 / 视频 / 网页),内置液态玻璃与 Folia 吉祥物,并可从自建站点拉取壁纸。单包形态(组件已合并)。",
5
5
  "type": "module",
6
6
  "engines": {