Fix album track order for date added sorting
This commit is contained in:
parent
27815fcfba
commit
78852a8c1a
1 changed files with 5 additions and 0 deletions
|
@ -2531,6 +2531,11 @@ const app = new Vue({
|
||||||
} else if (prefs.sort === "dateAdded") {
|
} else if (prefs.sort === "dateAdded") {
|
||||||
aa = a.relationships?.albums?.data[0]?.attributes?.dateAdded;
|
aa = a.relationships?.albums?.data[0]?.attributes?.dateAdded;
|
||||||
bb = b.relationships?.albums?.data[0]?.attributes?.dateAdded;
|
bb = b.relationships?.albums?.data[0]?.attributes?.dateAdded;
|
||||||
|
// if dateAdded is equal, an entire album was added at once, so sorting by track number (in reverse order because lower track number should be above in descending mode)
|
||||||
|
if (aa === bb) {
|
||||||
|
aa = b.attributes.trackNumber;
|
||||||
|
bb = a.attributes.trackNumber;
|
||||||
|
}
|
||||||
} else if (prefs.sort === "artistName") {
|
} else if (prefs.sort === "artistName") {
|
||||||
if (a.relationships?.artists?.data[0]?.id === b.relationships?.artists?.data[0]?.id) {
|
if (a.relationships?.artists?.data[0]?.id === b.relationships?.artists?.data[0]?.id) {
|
||||||
aa = a.attributes.albumName;
|
aa = a.attributes.albumName;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue