Update:Load playlists only when needed & remove podcast episode from playlist when deleted

This commit is contained in:
advplyr 2023-07-23 09:42:57 -05:00
parent 5a9eed0a5a
commit 710a62c2af
7 changed files with 178 additions and 23 deletions

View file

@ -122,7 +122,7 @@ class UserController {
// Todo: check if user is logged in and cancel streams
// Remove user playlists
const userPlaylists = Database.playlists.filter(p => p.userId === user.id)
const userPlaylists = await Database.models.playlist.getPlaylistsForUserAndLibrary(user.id)
for (const playlist of userPlaylists) {
await Database.removePlaylist(playlist.id)
}