mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-02-19 00:18:56 +01:00
Update view feed modal to sort episodes by pub date ascending
This commit is contained in:
parent
ed3af5bdcd
commit
39567c6c22
@ -137,7 +137,16 @@ export default {
|
||||
this.$toast.error(this.$strings.ToastFailedToLoadData)
|
||||
return
|
||||
}
|
||||
this.feeds = data.feeds
|
||||
this.feeds = data.feeds.map((feed) => ({
|
||||
...feed,
|
||||
episodes: [...feed.episodes].sort((a, b) => {
|
||||
if (!a.pubDate) return 1 // null dates sort to end
|
||||
if (!b.pubDate) return -1
|
||||
const dateA = new Date(a.pubDate)
|
||||
const dateB = new Date(b.pubDate)
|
||||
return dateA - dateB
|
||||
})
|
||||
}))
|
||||
},
|
||||
init() {
|
||||
this.loadFeeds()
|
||||
|
Loading…
Reference in New Issue
Block a user