diff --git a/src/app/services/playlists.service.ts b/src/app/services/playlists.service.ts index c6fbda466..d00c9d721 100644 --- a/src/app/services/playlists.service.ts +++ b/src/app/services/playlists.service.ts @@ -80,6 +80,21 @@ export class PlaylistsService { title: updatedPlaylist.title, autoRefresh: updatedPlaylist.autoRefresh, userAgent: updatedPlaylist.userAgent, + ...(updatedPlaylist.serverUrl !== null + ? { serverUrl: updatedPlaylist.serverUrl } + : {}), + ...(updatedPlaylist.portalUrl !== null + ? { portalUrl: updatedPlaylist.portalUrl } + : {}), + ...(updatedPlaylist.macAddress !== null + ? { macAddress: updatedPlaylist.macAddress } + : {}), + ...(updatedPlaylist.username !== null + ? { username: updatedPlaylist.username } + : {}), + ...(updatedPlaylist.password !== null + ? { password: updatedPlaylist.password } + : {}), }) ) ); diff --git a/src/app/state/reducers.ts b/src/app/state/reducers.ts index 9a5c9a5cd..dd8389be9 100644 --- a/src/app/state/reducers.ts +++ b/src/app/state/reducers.ts @@ -181,15 +181,21 @@ export const playlistReducer = createReducer( title: action.playlist.title, autoRefresh: action.playlist.autoRefresh || false, userAgent: action.playlist.userAgent, - ...(action.playlist.serverUrl + ...(action.playlist.serverUrl !== null ? { serverUrl: action.playlist.serverUrl } : {}), - ...(action.playlist.username + ...(action.playlist.username !== null ? { username: action.playlist.username } : {}), - ...(action.playlist.password + ...(action.playlist.password !== null ? { password: action.playlist.password } : {}), + ...(action.playlist.macAddress !== null + ? { macAddress: action.playlist.macAddress } + : {}), + ...(action.playlist.portalUrl !== null + ? { portalUrl: action.playlist.portalUrl } + : {}), }, }, state.playlists