Update:Podcast episodes look for new episodes after this date add input to set the max # of episodes to download

This commit is contained in:
advplyr 2022-09-03 08:06:52 -05:00
parent c17612a233
commit 3dc848a106
4 changed files with 35 additions and 11 deletions

View file

@ -140,7 +140,9 @@ class PodcastController {
return res.status(500).send('Podcast has no rss feed url')
}
var newEpisodes = await this.podcastManager.checkAndDownloadNewEpisodes(libraryItem)
const maxEpisodesToDownload = !isNaN(req.query.limit) ? Number(req.query.limit) : 3
var newEpisodes = await this.podcastManager.checkAndDownloadNewEpisodes(libraryItem, maxEpisodesToDownload)
res.json({
episodes: newEpisodes || []
})