do not show empty albums at artists either

This commit is contained in:
tibbi 2022-11-04 20:39:51 +01:00
parent dd1aae80f7
commit b75253e4bf
2 changed files with 8 additions and 2 deletions

View file

@ -109,7 +109,13 @@ class MainActivity : SimpleActivity() {
}
if (storedExcludedFolders != config.excludedFolders.hashCode()) {
(folders_fragment_holder as? MyViewPagerFragment)?.setupFragment(this)
updateAllDatabases {
runOnUiThread {
getAllFragments().forEach {
it?.setupFragment(this)
}
}
}
}
}

View file

@ -85,7 +85,7 @@ fun Context.getArtistsSync(): ArrayList<Artist> {
val title = cursor.getStringValue(Audio.Artists.ARTIST) ?: MediaStore.UNKNOWN_STRING
var artist = Artist(id, title, 0, 0, 0)
artist = fillArtistExtras(this, artist)
if (artist.albumCnt > 0) {
if (artist.albumCnt > 0 && artist.trackCnt > 0) {
artists.add(artist)
}
}