[web-src] Only filter albums/artists if "hide singles" is enabled

This commit is contained in:
chme 2020-09-20 17:59:46 +02:00
parent d29f56f3eb
commit f4f80f3508
2 changed files with 8 additions and 2 deletions

View File

@ -65,7 +65,10 @@ export default {
},
albums_filtered () {
return this.albums.items.filter(album => !this.hide_singles || album.track_count > 2)
if (this.hide_singles) {
return this.albums.items.filter(album => album.track_count > 2)
}
return this.albums.items
}
},

View File

@ -67,7 +67,10 @@ export default {
},
artists_filtered () {
return this.artists.items.filter(artist => !this.hide_singles || artist.track_count > (artist.album_count * 2))
if (this.hide_singles) {
return this.artists.items.filter(artist => artist.track_count > (artist.album_count * 2))
}
return this.artists.items
}
},