image: make artist images sort by count
Make artist images sort by count instead of by name. I've recently added a few singles in my library that have been cluttering the previous artist image algorithm with non-ideal covers. Instead of sorting by name (Which was really an artifact of the old MediaStore engine anyway), sort by the amount of songs of each album instead, which hopefully should weight images less towards singles and more towards albums (And especially albums the user likes).
This commit is contained in:
@@ -86,7 +86,8 @@ private constructor(
|
||||
private val artist: Artist
|
||||
) : BaseFetcher() {
|
||||
override suspend fun fetch(): FetchResult? {
|
||||
val albums = Sort(Sort.Mode.ByName, true).albums(artist.albums)
|
||||
// Pick the "most prominent" albums (i.e albums with the most songs) to show in the image.
|
||||
val albums = Sort(Sort.Mode.ByCount, false).albums(artist.albums)
|
||||
val results = albums.mapAtMost(4) { album -> fetchCover(context, album) }
|
||||
return createMosaic(context, results, size)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user