hook up cmd queue to PlaybackManager

This commit is contained in:
Drew Weymouth
2024-08-30 08:20:02 -07:00
parent 0fffe9d8ed
commit 136bade8b4
8 changed files with 196 additions and 141 deletions
+1 -1
View File
@@ -106,7 +106,7 @@ func NewBottomPanel(pm *backend.PlaybackManager, im *backend.ImageManager, contr
pm.OnLoopModeChange(bp.AuxControls.SetLoopMode)
pm.OnVolumeChange(bp.AuxControls.VolumeControl.SetVolume)
bp.AuxControls.VolumeControl.OnSetVolume = func(v int) {
_ = pm.SetVolume(v)
pm.SetVolume(v)
}
bp.AuxControls.OnChangeLoopMode(func() {
pm.SetNextLoopMode()
+1 -1
View File
@@ -158,7 +158,7 @@ func (c *Controller) ConnectPlayQueuelistActions(list *widgets.PlayQueueList) {
}
list.OnAddToPlaylist = c.DoAddTracksToPlaylistWorkflow
list.OnPlayItemAt = func(tracknum int) {
_ = c.App.PlaybackManager.PlayTrackAt(tracknum)
c.App.PlaybackManager.PlayTrackAt(tracknum)
}
list.OnShowArtistPage = func(artistID string) {
c.NavigateTo(ArtistRoute(artistID))
+3 -3
View File
@@ -241,13 +241,13 @@ func (m *MainWindow) SetupSystemTrayMenu(appName string, fyneApp fyne.App) {
if desk, ok := fyneApp.(desktop.App); ok {
menu := fyne.NewMenu(appName,
fyne.NewMenuItem(fmt.Sprintf("%s/%s", lang.L("Play"), lang.L("Pause")), func() {
_ = m.App.PlaybackManager.PlayPause()
m.App.PlaybackManager.PlayPause()
}),
fyne.NewMenuItem(lang.L("Previous"), func() {
_ = m.App.PlaybackManager.SeekBackOrPrevious()
m.App.PlaybackManager.SeekBackOrPrevious()
}),
fyne.NewMenuItem(lang.L("Next"), func() {
_ = m.App.PlaybackManager.SeekNext()
m.App.PlaybackManager.SeekNext()
}),
fyne.NewMenuItemSeparator(),
fyne.NewMenuItem(lang.L("Volume")+" +10%", func() {