Fixed Album Artist sort order
This commit is contained in:
parent
2dc332befd
commit
ea750a682c
1 changed files with 3 additions and 7 deletions
|
@ -15,6 +15,7 @@
|
||||||
package code.name.monkey.retromusic.repository
|
package code.name.monkey.retromusic.repository
|
||||||
|
|
||||||
import android.provider.MediaStore.Audio.AudioColumns
|
import android.provider.MediaStore.Audio.AudioColumns
|
||||||
|
import code.name.monkey.retromusic.ALBUM_ARTIST
|
||||||
import code.name.monkey.retromusic.helper.SortOrder
|
import code.name.monkey.retromusic.helper.SortOrder
|
||||||
import code.name.monkey.retromusic.model.Album
|
import code.name.monkey.retromusic.model.Album
|
||||||
import code.name.monkey.retromusic.model.Artist
|
import code.name.monkey.retromusic.model.Artist
|
||||||
|
@ -110,7 +111,8 @@ class RealArtistRepository(
|
||||||
songRepository.makeSongCursor(
|
songRepository.makeSongCursor(
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
getSongLoaderSortOrder()
|
"lower($ALBUM_ARTIST)" +
|
||||||
|
if (PreferenceUtil.artistSortOrder == SortOrder.ArtistSortOrder.ARTIST_A_Z) "" else " DESC"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
return splitIntoAlbumArtists(albumRepository.splitIntoAlbums(songs))
|
return splitIntoAlbumArtists(albumRepository.splitIntoAlbums(songs))
|
||||||
|
@ -155,12 +157,6 @@ class RealArtistRepository(
|
||||||
} else {
|
} else {
|
||||||
Artist.empty
|
Artist.empty
|
||||||
}
|
}
|
||||||
}.apply {
|
|
||||||
if (PreferenceUtil.artistSortOrder == SortOrder.ArtistSortOrder.ARTIST_A_Z) {
|
|
||||||
sortedBy { it.name.lowercase() }
|
|
||||||
} else {
|
|
||||||
sortedByDescending { it.name.lowercase() }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue