Add:Podcasts latest episodes page

This commit is contained in:
advplyr committed 2022-09-17 15:23:33 -05:00
1 parent f6b6c0a41e
commit ae4ac392c6
7 files changed
+184 -6

No files matched your search

+5
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)
}