feat: add playlist song picker

This commit is contained in:
Dominik
2026-08-09 22:11:21 +02:00
parent cf0a70d834
commit 4f6f84bdb5
6 changed files with 416 additions and 60 deletions
+9 -4
View File
@@ -1675,17 +1675,22 @@ app.post('/api/:endpoint', async (request, response) => {
return
}
if (
!playlist.entries.some(
playlist.entries.some(
(entry) =>
entry.source === request.body.source &&
entry.songId === request.body.songId,
)
) {
playlist.entries.push({
source: request.body.source,
songId: request.body.songId,
response.json({
success: false,
error: 'song_already_in_playlist',
})
return
}
playlist.entries.push({
source: request.body.source,
songId: request.body.songId,
})
response.json({ success: true, data: musicBootstrap() })
return
}