fix: show artist covers (raw url in artist info, cover id elsewhere) via scanned guessed artist folder

closes #180
closes #179
This commit is contained in:
sentriz
2022-01-04 22:53:30 +00:00
parent cb6b33a9fb
commit c0ebd26422
5 changed files with 33 additions and 26 deletions

View File

@@ -72,11 +72,15 @@ func NewTrackByTags(t *db.Track, album *db.Album) *TrackChild {
}
func NewArtistByTags(a *db.Artist) *Artist {
return &Artist{
ret := &Artist{
ID: a.SID(),
Name: a.Name,
AlbumCount: a.AlbumCount,
}
if a.GuessedFolder != nil && a.GuessedFolder.Cover != "" {
ret.CoverID = a.GuessedFolder.SID()
}
return ret
}
func NewGenre(g *db.Genre) *Genre {