mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2026-07-30 08:28:34 +02:00
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:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user