From b4ab95f5b4ca50ae46b4c760f47dc7f5918eea5a Mon Sep 17 00:00:00 2001 From: natilou <30585029+natilou@users.noreply.github.com> Date: Fri, 16 Jun 2023 15:00:51 -0300 Subject: [PATCH] Ability to download album and playlist Add in the "meatball menu" of the Album and Playlist pages the option to download the tracks of the corresponding album or playlist in a zip file. When download is clicked, a dialog window appears allowing you to choose the file name and where to save the file. --- ui/browsing/albumpage.go | 3 +++ ui/browsing/playlistpage.go | 3 +++ 2 files changed, 6 insertions(+) diff --git a/ui/browsing/albumpage.go b/ui/browsing/albumpage.go index 878e60b..4948967 100644 --- a/ui/browsing/albumpage.go +++ b/ui/browsing/albumpage.go @@ -200,6 +200,9 @@ func NewAlbumPageHeader(page *AlbumPage) *AlbumPageHeader { fyne.NewMenuItem("Add to playlist...", func() { a.page.contr.DoAddTracksToPlaylistWorkflow( sharedutil.TracksToIDs(a.page.tracks)) + }), + fyne.NewMenuItem("Download", func() { + a.page.contr.ShowDownloadDialog(a.page.tracks) })) pop = widget.NewPopUpMenu(menu, fyne.CurrentApp().Driver().CanvasForObject(a)) } diff --git a/ui/browsing/playlistpage.go b/ui/browsing/playlistpage.go index 66c9bad..9e28b93 100644 --- a/ui/browsing/playlistpage.go +++ b/ui/browsing/playlistpage.go @@ -260,6 +260,9 @@ func NewPlaylistPageHeader(page *PlaylistPage) *PlaylistPageHeader { fyne.NewMenuItem("Add to playlist...", func() { a.page.contr.DoAddTracksToPlaylistWorkflow( sharedutil.TracksToIDs(a.page.tracks)) + }), + fyne.NewMenuItem("Download", func() { + a.page.contr.ShowDownloadDialog(a.page.tracks) })) pop = widget.NewPopUpMenu(menu, fyne.CurrentApp().Driver().CanvasForObject(a)) }