Add:Podcasts latest episodes page

This commit is contained in:
advplyr 2022-09-17 15:23:33 -05:00
parent f6b6c0a41e
commit ae4ac392c6
7 changed files with 184 additions and 6 deletions

View file

@ -517,6 +517,11 @@ class LibraryController {
const unfinishedEpisodes = libraryItem.media.episodes.filter(ep => {
const userProgress = req.user.getMediaProgress(libraryItem.id, ep.id)
return !userProgress || !userProgress.isFinished
}).map(_ep => {
const ep = _ep.toJSONExpanded()
ep.podcast = libraryItem.media.toJSONMinified()
ep.libraryItemId = libraryItem.id
return ep
})
allUnfinishedEpisodes.push(...unfinishedEpisodes)
}