mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-01-27 08:19:00 +01:00
Fix:Server crash when removing last item from a playlist #2211
This commit is contained in:
parent
e687a3403e
commit
3108bc5ccc
@ -286,7 +286,7 @@ class PodcastController {
|
||||
const numItems = pmi.playlist.playlistMediaItems.length - 1
|
||||
|
||||
if (!numItems) {
|
||||
Logger.info(`[PodcastController] Playlist "${playlist.name}" has no more items - removing it`)
|
||||
Logger.info(`[PodcastController] Playlist "${pmi.playlist.name}" has no more items - removing it`)
|
||||
const jsonExpanded = await pmi.playlist.getOldJsonExpanded()
|
||||
SocketAuthority.clientEmitter(pmi.playlist.userId, 'playlist_removed', jsonExpanded)
|
||||
await pmi.playlist.destroy()
|
||||
|
Loading…
Reference in New Issue
Block a user