Added Exception for j, k (down, up) in the playlist view

This commit is contained in:
aditya-K2 2022-04-05 23:32:29 +05:30
parent 43a7a5c010
commit 426e9eb919

12
main.go
View File

@ -350,6 +350,18 @@ func main() {
FuncMap[val]()
return nil
} else {
if ui.HasFocus("Playlist") {
if e.Rune() == 'j' || e.Rune() == 'k' {
if p, err := CONN.PlaylistInfo(-1, -1); err != nil {
Notify.Send("Error Getting PlaylistInfo")
} else {
if len(p) == 0 {
Notify.Send("Empty Playlist")
return nil
}
}
}
}
return e
}
})