Tracks can be added to playlists via drag

This commit is contained in:
patben8 committed 2026-10-06 22:41:29 +02:00
1 parent b154df430a
commit 89c7dade25
8 files changed
+246 -23

No files matched your search

+10
View File
@@ -0,0 +1,10 @@
import type { PlaylistNode } from '../api'
/** Every selectable playlist at or under a node, in tree order. A folder
* contributes its nested playlists, a playlist itself — which is what adding a
* node to an export means: the export stores playlist ids, and a folder is a
* shape in the tree, not a thing with tracks. */
export function playlistIdsUnder(node: PlaylistNode): string[] {
const here = node.kind === 'folder' ? [] : [node.id]
return [...here, ...(node.children ?? []).flatMap(playlistIdsUnder)]
}