Fix #496: Persist repeat mode setting across restarts

This commit is contained in:
Drew Weymouth
2025-01-01 14:23:02 -08:00
parent 16d8cb4a58
commit 6572e74aa8
8 changed files with 46 additions and 8 deletions
+8
View File
@@ -147,6 +147,14 @@ func NewMainWindow(fyneApp fyne.App, appName, displayAppName, appVersion string,
// TODO: when all shutdowns exit cleanly, remove these lines
// as they are already executed in app.Shutdown()
app.Config.LocalPlayback.Volume = app.LocalPlayer.GetVolume()
repeatMode := "None"
switch app.PlaybackManager.GetLoopMode() {
case backend.LoopOne:
repeatMode = "One"
case backend.LoopAll:
repeatMode = "All"
}
app.Config.Playback.RepeatMode = repeatMode
app.SavePlayQueueIfEnabled()
app.SaveConfigFile()