Remove deleted episode from returned libraryItem object

This commit is contained in:
mikiher 2025-01-11 22:26:36 +02:00
parent 5e2282ef76
commit de5bc63d88

View File

@ -461,6 +461,9 @@ class PodcastController {
return res.sendStatus(404) return res.sendStatus(404)
} }
// Remove it from the podcastEpisodes array
req.libraryItem.media.podcastEpisodes = req.libraryItem.media.podcastEpisodes.filter((ep) => ep.id !== episodeId)
if (hardDelete) { if (hardDelete) {
const audioFile = episode.audioFile const audioFile = episode.audioFile
// TODO: this will trigger the watcher. should maybe handle this gracefully // TODO: this will trigger the watcher. should maybe handle this gracefully