Skip to content
Snippets Groups Projects
Commit 31f12266 authored by Eliot Berriot's avatar Eliot Berriot
Browse files

Merge branch '1016-artist-cover' into 'develop'

Resolve "Artist avatars fall back to default album cover"

Closes #1016

See merge request funkwhale/funkwhale!1004
parents 9f3ca7b4 8a0cf918
No related branches found
No related tags found
No related merge requests found
...@@ -51,13 +51,13 @@ export default { ...@@ -51,13 +51,13 @@ export default {
return url return url
}, },
cover () { cover () {
if (this.artist.cover) { if (this.artist.cover && this.artist.cover.original) {
return this.artist.cover return this.artist.cover
} }
return this.artist.albums.map((a) => { return this.artist.albums.map((a) => {
return a.cover return a.cover
}).filter((c) => { }).filter((c) => {
return !!c return c && c.original
})[0] || {} })[0] || {}
}, },
} }
......
...@@ -230,12 +230,12 @@ export default { ...@@ -230,12 +230,12 @@ export default {
) )
}, },
cover() { cover() {
if (this.object.cover) { if (this.object.cover && this.object.cover.original) {
return this.object.cover return this.object.cover
} }
return this.object.albums return this.object.albums
.filter(album => { .filter(album => {
return album.cover return album.cover && album.cover.original
}) })
.map(album => { .map(album => {
return album.cover return album.cover
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment