mirror of
https://github.com/MrPatben8/konduktor.git
synced 2026-11-27 10:22:51 +01:00
Tracks can be added to playlists via drag
This commit is contained in:
1 parent
b154df430a
commit
89c7dade25
8 files changed
+246
-23
No files matched your search
@@ -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)]
|
||||
}
|
||||
Reference in new issue
Block a user