Skip to content

Commit

Permalink
Remove deleted episode from returned libraryItem object
Browse files Browse the repository at this point in the history
  • Loading branch information
mikiher committed Jan 11, 2025
1 parent 5e2282e commit de5bc63
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions server/controllers/PodcastController.js
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,9 @@ class PodcastController {
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) {
const audioFile = episode.audioFile
// TODO: this will trigger the watcher. should maybe handle this gracefully
Expand Down

0 comments on commit de5bc63

Please sign in to comment.