diff --git a/plugins/folder_library/CLAUDE.md b/plugins/folder_library/CLAUDE.md index f687dbb..dc69ab5 100644 --- a/plugins/folder_library/CLAUDE.md +++ b/plugins/folder_library/CLAUDE.md @@ -153,15 +153,14 @@ Each song object (built by `_meta()`): "added": 1748132400.0, "arrangements": ["Lead", "Rhythm", "Bass"], "stems": ["Drums", "Bass", "Vocals"], - "lyrics": true, - "has_preview": true + "lyrics": true } ``` - `filename` is the full relative path from the DLC root — pass it directly to `window.playSong()`. - `added` is a Unix timestamp (float, seconds) from `stat().st_mtime` — convert with `new Date(added * 1000)`. Always recomputed fresh (it changes when a file moves), even on a metadata-cache hit. - `arrangements` / `stems` are flat lists of **strings**, even though `extract_meta()` returns them as objects. -- `has_preview` is set from the pack's manifest `preview:` key (via core `load_manifest`) — `true` iff `song_preview` will actually serve a preview. The frontend previews **only** `has_preview` songs, so hover never requests (and 404-logs) a preview-less pack. Hover-preview audio itself is **not** resolved here — it comes from the `song_preview` endpoint (see Preview on Hover). +- Hover-preview isn't resolved here at all — the cards just carry `data-fn`/`data-v3-play` markup and the `song_preview` plugin handles it (see Preview on Hover). ### extract_meta returns arrangements/stems as objects, not strings @@ -333,17 +332,16 @@ Drag-and-drop uses **pointer events** (mousedown/mousemove/mouseup), not the HTM ## Preview on Hover -Hovering a song for `_HOVER_PREVIEW_DELAY_MS` (800 ms) plays a short audio preview in place — no navigation to the player. Toggled by a play-icon toolbar button (`_injectToolbar`); **on by default** (`_previewHover`, persisted per surface under `previewHover` — only an explicit stored `'false'` disables it). +The Folder Library does **not** implement hover-preview itself — the `song_preview` plugin does, for the whole app. Its hover loop finds song elements by the selector `#v3-songs [data-fn]` (with a `[data-v3-play]` playable surface) and its `MutationObserver` watches the `#v3-songs` subtree — and the folder view (`#lib-folder-tree`) renders **inside** `#v3-songs`. So all folder_library has to do is give each card/row the standard markup: -- **Audio** — a dedicated `_previewAudio` `