Add UI for viewing the album info returned by Subsonic getAlbumInfo API
- Adding "Get Info" in album page's "meatball" menu. When the option is clicked a pop up appears with the album information and links to Last.fm and MusicBrainz. Screenshot: Fixes #105
This commit is contained in:
@@ -651,3 +651,22 @@ func (c *Controller) sendNotification(title, content string) {
|
||||
Content: content,
|
||||
})
|
||||
}
|
||||
|
||||
func (c *Controller) ShowAlbumInfoDialog(albumID, albumName string, albumCover image.Image) {
|
||||
go func() {
|
||||
albumInfo, err := c.App.ServerManager.Server.GetAlbumInfo(albumID)
|
||||
if err != nil {
|
||||
log.Print("Error getting album info: ", err)
|
||||
return
|
||||
}
|
||||
dlg := dialogs.NewAlbumInfoDialog(albumInfo, albumName, albumCover)
|
||||
pop := widget.NewModalPopUp(dlg, c.MainWindow.Canvas())
|
||||
dlg.OnDismiss = func() {
|
||||
pop.Hide()
|
||||
c.doModalClosed()
|
||||
}
|
||||
c.ClosePopUpOnEscape(pop)
|
||||
c.haveModal = true
|
||||
pop.Show()
|
||||
}()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user