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:
parent
a96df79572
commit
8423b6d488
2 changed files with 16 additions and 13 deletions
|
@ -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}
|
||||
|
|
|
@ -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;
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue