handle multiple artists properly in UI

This commit is contained in:
Drew Weymouth
2023-10-22 11:40:06 -07:00
parent d6a1f70823
commit 4f002574c2
13 changed files with 73 additions and 48 deletions
+1 -1
View File
@@ -189,7 +189,7 @@ func (a *ArtistPage) showAlbumGrid() {
Name: al.Name,
ID: al.ID,
CoverArtID: al.CoverArtID,
Secondary: strconv.Itoa(al.Year),
Secondary: []string{strconv.Itoa(al.Year)},
}
})
if g := a.pool.Obtain(util.WidgetTypeGridView); g != nil {
+1 -1
View File
@@ -158,7 +158,7 @@ func createArtistsGridViewModel(artists []*mediaprovider.Artist) []widgets.GridV
Name: ar.Name,
ID: ar.ID,
CoverArtID: ar.CoverArtID,
Secondary: fmt.Sprintf("%d %s", ar.AlbumCount, albums),
Secondary: []string{fmt.Sprintf("%d %s", ar.AlbumCount, albums)},
}
})
}
+1 -1
View File
@@ -333,7 +333,7 @@ func buildArtistGridViewModel(artists []*mediaprovider.Artist) []widgets.GridVie
ID: ar.ID,
CoverArtID: ar.CoverArtID,
Name: ar.Name,
Secondary: fmt.Sprintf("%d %s", ar.AlbumCount, albums),
Secondary: []string{fmt.Sprintf("%d %s", ar.AlbumCount, albums)},
})
}
return model
+1 -1
View File
@@ -175,7 +175,7 @@ func createPlaylistGridViewModel(playlists []*mediaprovider.Playlist) []widgets.
Name: pl.Name,
ID: pl.ID,
CoverArtID: pl.CoverArtID,
Secondary: fmt.Sprintf("%d %s", pl.TrackCount, tracks),
Secondary: []string{fmt.Sprintf("%d %s", pl.TrackCount, tracks)},
}
})
}