mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-07-31 16:24:45 +02:00
Update:Podcast new episode check cronjob to use last episode pub date if exists otherwise fallback to using last check date
This commit is contained in:
parent
74d26eece4
commit
17d15144eb
2 changed files with 21 additions and 12 deletions
|
@ -104,6 +104,15 @@ class Podcast {
|
|||
get numTracks() {
|
||||
return this.episodes.length
|
||||
}
|
||||
get latestEpisodePublished() {
|
||||
var largestPublishedAt = 0
|
||||
this.episodes.forEach((ep) => {
|
||||
if (ep.publishedAt && ep.publishedAt > largestPublishedAt) {
|
||||
largestPublishedAt = ep.publishedAt
|
||||
}
|
||||
})
|
||||
return largestPublishedAt
|
||||
}
|
||||
|
||||
update(payload) {
|
||||
var json = this.toJSON()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue