code clean up

This commit is contained in:
raziman 2020-07-01 17:48:33 +08:00
parent f2388cacd9
commit 08a9e6f8d6
2 changed files with 6 additions and 5 deletions

View File

@ -205,6 +205,7 @@ func (p *Player) TogglePause() {
// skips current song
func (p *Player) Skip() {
if queue.GetItemCount() > 0 {
p.ctrl.Streamer = nil
p.done <- true

View File

@ -40,13 +40,13 @@ func InitPlaylist() *Playlist {
tree := tview.NewTreeView().SetRoot(root)
playlist := &Playlist{tree,nil}
playlist := &Playlist{tree, nil}
rootAudioFile := &AudioFile{
Name: root.GetText(),
Path: rootDir,
IsAudioFile: false,
Parent: nil,
Name: root.GetText(),
Path: rootDir,
IsAudioFile: false,
Parent: nil,
}
root.SetReference(rootAudioFile)