1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2024-12-25 01:02:05 +00:00

Fixed: Clean Artist Index Sort Menu, Fix Next/Last Album Sorting

Fixes #256
This commit is contained in:
Qstick 2018-03-24 22:21:17 -04:00
parent a96df79572
commit 8423b6d488
2 changed files with 16 additions and 13 deletions

View file

@ -65,21 +65,21 @@ function ArtistIndexSortMenu(props) {
</SortMenuItem>
<SortMenuItem
name="nextAiring"
name="nextAlbum"
sortKey={sortKey}
sortDirection={sortDirection}
onPress={onSortSelect}
>
Next Airing
Next Album
</SortMenuItem>
<SortMenuItem
name="previousAiring"
name="lastAlbum"
sortKey={sortKey}
sortDirection={sortDirection}
onPress={onSortSelect}
>
Previous Airing
Last Album
</SortMenuItem>
<SortMenuItem
@ -118,15 +118,6 @@ function ArtistIndexSortMenu(props) {
Track Count
</SortMenuItem>
<SortMenuItem
name="latestAlbum"
sortKey={sortKey}
sortDirection={sortDirection}
onPress={onSortSelect}
>
Latest Album
</SortMenuItem>
<SortMenuItem
name="path"
sortKey={sortKey}

View file

@ -163,6 +163,18 @@ export const defaultState = {
return progress + trackCount / 1000000;
},
nextAlbum: function(item) {
if (item.nextAlbum) {
return item.nextAlbum.title;
}
},
lastAlbum: function(item) {
if (item.lastAlbum) {
return item.lastAlbum.title;
}
},
albumCount: function(item) {
return item.statistics.albumCount;
},