1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Merge pull request #5429 from thornbill/fix-create-playlist

This commit is contained in:
Bill Thornton 2024-04-29 01:43:17 -04:00 committed by GitHub
commit 5dfefb0518
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -73,13 +73,15 @@ function createPlaylist(dlg: DialogElement) {
const apiClient = ServerConnections.getApiClient(currentServerId);
const api = toApi(apiClient);
const itemIds = dlg.querySelector<HTMLInputElement>('.fldSelectedItemIds')?.value || '';
const itemIds = dlg.querySelector<HTMLInputElement>('.fldSelectedItemIds')?.value || undefined;
return getPlaylistsApi(api)
.createPlaylist({
name: dlg.querySelector<HTMLInputElement>('#txtNewPlaylistName')?.value,
ids: itemIds.split(','),
userId: apiClient.getCurrentUserId()
createPlaylistDto: {
Name: dlg.querySelector<HTMLInputElement>('#txtNewPlaylistName')?.value,
Ids: itemIds?.split(','),
UserId: apiClient.getCurrentUserId()
}
})
.then(result => {
dlg.submitted = true;