Skip to content

Commit

Permalink
Fix wrong playlist being loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
yktoo committed May 11, 2020
1 parent fb3582d commit 9d87ff1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/player/main-window.go
Original file line number Diff line number Diff line change
Expand Up @@ -886,6 +886,7 @@ func (w *MainWindow) queueOne(replace bool, uri string) {

// queuePlaylist() adds or replaces the content of the queue with the specified playlist
func (w *MainWindow) queuePlaylist(replace bool, playlistName string) {
log.Debugf("queuePlaylist(%v, %v)", replace, playlistName)
var err error
w.connector.IfConnected(func(client *mpd.Client) {
commands := client.BeginCommandList()
Expand Down Expand Up @@ -1379,6 +1380,7 @@ func (w *MainWindow) updatePlaylists() {
// Repopulate the playlists list
playlists := w.connector.GetPlaylists()
for _, name := range playlists {
name := name // Make an in-loop copy of the var
_, _, err := util.NewListBoxRow(
w.lbxPlaylists,
name,
Expand Down

0 comments on commit 9d87ff1

Please sign in to comment.