Skip to content

Commit

Permalink
Update theme
Browse files Browse the repository at this point in the history
  • Loading branch information
fenimore committed Jul 4, 2017
1 parent ff9c09f commit d78d3f0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions alio.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,9 @@ or use -d flag to designate directory name
libTable.Select(libTable.Selected() - 1)
}

done := make(chan struct{}, 128)
forward := make(chan struct{}, 128)
previous := make(chan struct{}, 128)
done := make(chan struct{}, 32)
forward := make(chan struct{}, 1)
previous := make(chan struct{}, 32)
play := func() {

s := libTable.Selected() - 1
Expand Down Expand Up @@ -230,7 +230,12 @@ or use -d flag to designate directory name
ui.SetKeybinding("Tab", play)
ui.SetKeybinding("p", pause)

ui.SetKeybinding("Right", func() { forward <- struct{}{} })
ui.SetKeybinding("Right", func() {
select {
case forward <- struct{}{}:
default:
}
})
ui.SetKeybinding("Ctrl-F", func() { forward <- struct{}{} })
ui.SetKeybinding("Ctrl-f", func() { forward <- struct{}{} })
ui.SetKeybinding("Left", func() { previous <- struct{}{} })
Expand Down Expand Up @@ -323,18 +328,17 @@ func playAlbum(p *vlc.Player, a Album, l *tui.List, t *tui.Table, s *tui.StatusB
l.SetSelected(-1)
}
select {
case <-done:
return err
case <-next:
break PlaybackLoop
case <-prev:
continue // TODO: implement previous
case <-done:
return err
default:
time.Sleep(50 * time.Millisecond)
}
}
}

return err
}

Expand Down
Binary file modified screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d78d3f0

Please sign in to comment.