hook up tap handling and action dispatch
This commit is contained in:
@@ -84,6 +84,11 @@ func (m *Controller) ConnectAlbumGridActions(grid *widgets.GridView) {
|
||||
grid.OnPlay = func(albumID string, shuffle bool) {
|
||||
go m.App.PlaybackManager.PlayAlbum(albumID, 0, shuffle)
|
||||
}
|
||||
grid.OnFavorite = func(albumID string, favorite bool) {
|
||||
m.App.ServerManager.Server.SetFavorite(mediaprovider.RatingFavoriteParameters{
|
||||
AlbumIDs: []string{albumID},
|
||||
}, favorite)
|
||||
}
|
||||
grid.OnShowItemPage = func(albumID string) {
|
||||
m.NavigateTo(AlbumRoute(albumID))
|
||||
}
|
||||
@@ -128,6 +133,11 @@ func (m *Controller) ConnectArtistGridActions(grid *widgets.GridView) {
|
||||
go m.DoAddTracksToPlaylistWorkflow(
|
||||
sharedutil.TracksToIDs(m.GetArtistTracks(artistID)))
|
||||
}
|
||||
grid.OnFavorite = func(artistID string, favorite bool) {
|
||||
m.App.ServerManager.Server.SetFavorite(mediaprovider.RatingFavoriteParameters{
|
||||
ArtistIDs: []string{artistID},
|
||||
}, favorite)
|
||||
}
|
||||
grid.OnDownload = func(artistID string) {
|
||||
go func() {
|
||||
tracks := m.GetArtistTracks(artistID)
|
||||
|
||||
Reference in New Issue
Block a user