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

Fix id param when creating playlists

This commit is contained in:
Bill Thornton 2024-04-29 01:22:45 -04:00
parent f80f198288
commit 32cd1e9307

View file

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