Add notification when a download is completed
- fyne notication looks for the app icon to display it in the notication, so I setted the icon in `main.go`. - deleting points after "Download" option in grid view that I mistakenly leave it in a previous PR. - adding the new paremeter `downloadName` Screenshot: Fixes #202
This commit is contained in:
@@ -202,7 +202,13 @@ func NewAlbumPageHeader(page *AlbumPage) *AlbumPageHeader {
|
||||
sharedutil.TracksToIDs(a.page.tracks))
|
||||
}),
|
||||
fyne.NewMenuItem("Download", func() {
|
||||
a.page.contr.ShowDownloadDialog(a.page.tracks)
|
||||
go func() {
|
||||
album, err := a.page.mp.GetAlbum(a.albumID)
|
||||
if err != nil {
|
||||
log.Print("Error while getting the album: ", album)
|
||||
}
|
||||
a.page.contr.ShowDownloadDialog(a.page.tracks, album.Name)
|
||||
}()
|
||||
}))
|
||||
pop = widget.NewPopUpMenu(menu, fyne.CurrentApp().Driver().CanvasForObject(a))
|
||||
}
|
||||
|
||||
@@ -262,7 +262,7 @@ func NewPlaylistPageHeader(page *PlaylistPage) *PlaylistPageHeader {
|
||||
sharedutil.TracksToIDs(a.page.tracks))
|
||||
}),
|
||||
fyne.NewMenuItem("Download", func() {
|
||||
a.page.contr.ShowDownloadDialog(a.page.tracks)
|
||||
a.page.contr.ShowDownloadDialog(a.page.tracks, a.playlistInfo.Name)
|
||||
}))
|
||||
pop = widget.NewPopUpMenu(menu, fyne.CurrentApp().Driver().CanvasForObject(a))
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ func (a *PlaylistsPage) createGridView(playlists []*mediaprovider.Playlist) {
|
||||
log.Printf("error loading playlist: %s", err.Error())
|
||||
return
|
||||
}
|
||||
a.contr.ShowDownloadDialog(pl.Tracks)
|
||||
a.contr.ShowDownloadDialog(pl.Tracks, pl.Name)
|
||||
}()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user