From 6bb36381f1dc16b18914393fc2c70c15bae298e8 Mon Sep 17 00:00:00 2001 From: jflattery <6561797+jflattery@users.noreply.github.com> Date: Thu, 12 May 2022 20:26:21 +0000 Subject: [PATCH] Fix for unsorted feeds Fix for Podcasts such as Beers with Talos who don't publish their feed in a chronological order --- client/components/modals/podcast/EpisodeFeed.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/client/components/modals/podcast/EpisodeFeed.vue b/client/components/modals/podcast/EpisodeFeed.vue index b5f94a61..14a81f6e 100644 --- a/client/components/modals/podcast/EpisodeFeed.vue +++ b/client/components/modals/podcast/EpisodeFeed.vue @@ -148,6 +148,7 @@ export default { }) }, init() { + this.episodes.sort((a, b) => (a.publishedAt < b.publishedAt) ? 1 : -1) for (let i = 0; i < this.episodes.length; i++) { var episode = this.episodes[i] if (episode.enclosure && !this.itemEpisodeMap[episode.enclosure.url]) {