sort: add disc number sorting to other sorts
Add disc number sorting to sorts that originally sorted by track. Forgot to add disc sorting to the other sort modes when adding disc number support. Fix that.
This commit is contained in:
parent
c0da3673c2
commit
df4ecc0137
1 changed files with 3 additions and 0 deletions
|
@ -134,6 +134,7 @@ sealed class Sort(open val isAscending: Boolean) {
|
|||
songs.sortWith(
|
||||
MultiComparator(
|
||||
compareByDynamic(NameComparator()) { it.album },
|
||||
compareBy(NullableComparator()) { it.disc },
|
||||
compareBy(NullableComparator()) { it.track },
|
||||
compareBy(NameComparator()) { it }))
|
||||
}
|
||||
|
@ -155,6 +156,7 @@ sealed class Sort(open val isAscending: Boolean) {
|
|||
compareByDynamic(NameComparator()) { it.album.artist },
|
||||
compareByDescending(NullableComparator()) { it.album.year },
|
||||
compareByDescending(NameComparator()) { it.album },
|
||||
compareBy(NullableComparator()) { it.disc },
|
||||
compareBy(NullableComparator()) { it.track },
|
||||
compareBy(NameComparator()) { it }))
|
||||
}
|
||||
|
@ -183,6 +185,7 @@ sealed class Sort(open val isAscending: Boolean) {
|
|||
MultiComparator(
|
||||
compareByDynamic(NullableComparator()) { it.album.year },
|
||||
compareByDescending(NameComparator()) { it.album },
|
||||
compareBy(NullableComparator()) { it.disc },
|
||||
compareBy(NullableComparator()) { it.track },
|
||||
compareBy(NameComparator()) { it }))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue