Browse Source

playlist: "p" in the current playlist should just play the song

By default "p" adds the song after the current song in the playlist
and starts playing it. In the current playlist, we don't want "p" to
add the song to the current playlist because it's already there.
master
Damien Cassou 11 months ago
parent
commit
ea0265a6c5
Signed by: DamienCassou <damien@cassou.me> GPG Key ID: B68746238E59B548
1 changed files with 8 additions and 0 deletions
  1. +8
    -0
      mpdel-playlist.el

+ 8
- 0
mpdel-playlist.el View File

@@ -105,6 +105,13 @@

(define-key mpdel-core-map (kbd "L") #'mpdel-playlist-open-stored-playlist)

(defun mpdel-playlist-play ()
"Start playing the song at point."
(interactive)
(if (derived-mode-p 'mpdel-playlist-current-playlist-mode)
(libmpdel-play-song (navigel-entity-at-point))
(mpdel-core-insert-current-playlist)))

(defun mpdel-playlist-move-up ()
"Move selected songs up in the current playlist."
(interactive)
@@ -143,6 +150,7 @@ Ask for stored playlist name."
(define-key map (kbd "<M-up>") #'mpdel-playlist-move-up)
(define-key map (kbd "<M-down>") #'mpdel-playlist-move-down)
(define-key map (kbd "C-x C-s") #'mpdel-playlist-save)
(define-key map (kbd "p") #'mpdel-playlist-play)
map)
"Keybindings for `mpdel-playlist-current-playlist-mode'.")



Loading…
Cancel
Save