mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-06-21 08:36:03 +02:00
Add Prev/Next buttons on podcast editing
This commit is contained in:
parent
12f231b886
commit
72396c5a98
5 changed files with 166 additions and 10 deletions
|
@ -225,6 +225,20 @@ class PodcastController {
|
|||
res.json(libraryItem.toJSONExpanded())
|
||||
}
|
||||
|
||||
// GET: api/podcasts/:id/episode/:episodeId
|
||||
async getEpisode(req, res) {
|
||||
const episodeId = req.params.episodeId;
|
||||
const libraryItem = req.libraryItem;
|
||||
|
||||
const episode = libraryItem.media.episodes.find(ep => ep.id === episodeId);
|
||||
if (!episode) {
|
||||
Logger.error(`[PodcastController] getEpisode episode ${episodeId} not found for item ${libraryItem.id}`)
|
||||
return res.sendStatus(404)
|
||||
}
|
||||
|
||||
res.json(episode)
|
||||
}
|
||||
|
||||
// DELETE: api/podcasts/:id/episode/:episodeId
|
||||
async removeEpisode(req, res) {
|
||||
var episodeId = req.params.episodeId
|
||||
|
@ -283,4 +297,4 @@ class PodcastController {
|
|||
next()
|
||||
}
|
||||
}
|
||||
module.exports = new PodcastController()
|
||||
module.exports = new PodcastController()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue