Play Next Episode correctly for serial podcasts

The default episode sort correctly takes podcast type into account (oldest to newest for serial, newest to oldest for episodic). However the Play Next Episode button uses episodic sorting for all podcast types. This minimal change fixes that.
This commit is contained in:
Ansel Santosa
2026-01-07 22:19:27 -08:00
parent b2c2b625e3
commit 9d650019cd
+5 -1
View File
@@ -535,7 +535,11 @@ export default {
if (this.isPodcast) {
this.episodes.sort((a, b) => {
return String(b.publishedAt).localeCompare(String(a.publishedAt), undefined, { numeric: true, sensitivity: 'base' })
if (this.podcastType === 'serial') {
return String(a.publishedAt).localeCompare(String(b.publishedAt), undefined, { numeric: true, sensitivity: 'base' })
} else {
return String(b.publishedAt).localeCompare(String(a.publishedAt), undefined, { numeric: true, sensitivity: 'base' })
}
})
let episode = this.episodes.find((ep) => {