diff --git a/src/renderer/views/Playlist/Playlist.js b/src/renderer/views/Playlist/Playlist.js index 1816c56ed6587..797a77328ecc7 100644 --- a/src/renderer/views/Playlist/Playlist.js +++ b/src/renderer/views/Playlist/Playlist.js @@ -91,6 +91,9 @@ export default defineComponent({ userPlaylistSortOrder: function () { return this.$store.getters.getUserPlaylistSortOrder }, + sortOrder: function () { + return this.isUserPlaylistRequested ? this.userPlaylistSortOrder : SORT_BY_VALUES.Custom + }, currentLocale: function () { return this.$i18n.locale.replace('_', '-') }, @@ -170,15 +173,15 @@ export default defineComponent({ return Object.values(SORT_BY_VALUES) }, isSortOrderCustom() { - return this.userPlaylistSortOrder === SORT_BY_VALUES.Custom + return this.sortOrder === SORT_BY_VALUES.Custom }, sortedPlaylistItems: function () { - if (this.userPlaylistSortOrder === SORT_BY_VALUES.Custom) { + if (this.sortOrder === SORT_BY_VALUES.Custom) { return this.playlistItems } return this.playlistItems.toSorted((a, b) => { - switch (this.userPlaylistSortOrder) { + switch (this.sortOrder) { case SORT_BY_VALUES.DateAddedNewest: return b.timeAdded - a.timeAdded case SORT_BY_VALUES.DateAddedOldest: @@ -192,7 +195,7 @@ export default defineComponent({ case SORT_BY_VALUES.AuthorDescending: return b.author.localeCompare(a.author, this.currentLocale) default: - console.error(`Unknown sortOrder: ${this.userPlaylistSortOrder}`) + console.error(`Unknown sortOrder: ${this.sortOrder}`) return 0 } }) diff --git a/src/renderer/views/Playlist/Playlist.vue b/src/renderer/views/Playlist/Playlist.vue index 750929c8cfa54..ba25e33800c36 100644 --- a/src/renderer/views/Playlist/Playlist.vue +++ b/src/renderer/views/Playlist/Playlist.vue @@ -48,7 +48,7 @@