mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-06-23 01:09:26 +02:00
Update podcast.numEpisodes when episodes are created or destroyed
This commit is contained in:
parent
8f192b1b17
commit
0169bf5518
3 changed files with 16 additions and 1 deletions
|
@ -498,6 +498,10 @@ class PodcastController {
|
|||
req.libraryItem.changed('libraryFiles', true)
|
||||
await req.libraryItem.save()
|
||||
|
||||
// update number of episodes
|
||||
req.libraryItem.media.numEpisodes = req.libraryItem.media.podcastEpisodes.length
|
||||
await req.libraryItem.media.save()
|
||||
|
||||
SocketAuthority.emitter('item_updated', req.libraryItem.toOldJSONExpanded())
|
||||
res.json(req.libraryItem.toOldJSON())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue