Delete selected song from Playlist.

Now, Pressing d deletes the selected song.
This commit is contained in:
aditya-K2 2021-11-06 19:25:23 +05:30
parent 0dca038dbb
commit af9b9a1c0a

20
main.go
View File

@ -173,11 +173,29 @@ func main() {
UI.App.Stop()
return nil
}
case 115:
case 115: // s: key
{
conn.Stop()
return nil
}
case 117: // u : key
{
_, err = conn.Update("")
if err != nil {
panic(err)
}
return nil
}
case 100: // d : key
{
if InsidePlaylist {
r, _ := UI.expandedView.GetSelection()
conn.Delete(r, -1)
return nil
} else {
return e
}
}
default:
{
return e