diff options
author | Michael Olson <mwolson@gnu.org> | 2005-09-17 02:11:00 +0000 |
---|---|---|
committer | Michael Olson <mwolson@gnu.org> | 2005-09-17 02:11:00 +0000 |
commit | 1d93684d37b6adda2be568a1c640534553a270e9 (patch) | |
tree | f7ae9c78370cc7a187545842abcb26663b75b668 | |
parent | 4bc68e51697b62d0d740d1062ee1802491c37ca8 (diff) |
mpd-updates
emms-player-mpd.el: Add handler for 'resume.
(emms-player-mpd-paused-p): Remove, since we already have
emms-player-paused-p.
(emms-player-mpd-pause): Use toggle instead of either play or
pause.
darcs-hash:20050917021138-1bfb2-733cf6b6af61426e3232ffa36aaa5a7df168a37b.gz
-rw-r--r-- | emms-player-mpd.el | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/emms-player-mpd.el b/emms-player-mpd.el index 404112e..c04d4b9 100644 --- a/emms-player-mpd.el +++ b/emms-player-mpd.el @@ -83,9 +83,6 @@ (require 'emms-player-simple) -(defvar emms-player-mpd-paused-p nil - "Whether the sound is paused.") - (defun emms-player-mpd-get-supported-regexp () "Returns a regexp of file extensions that MusicPD supports, or nil if we cannot figure it out." @@ -130,6 +127,10 @@ leave it set to nil." 'emms-player-mpd-pause) (emms-player-set emms-player-mpd + 'resume + 'emms-player-mpd-pause) + +(emms-player-set emms-player-mpd 'seek 'emms-player-mpd-seek) @@ -173,8 +174,7 @@ This handles both m3u and pls type playlists." (defun emms-player-mpd-play () "Play whatever is in the current MusicPD playlist." - (shell-command-to-string (concat emms-player-mpd-command-name " play")) - (setq emms-player-mpd-paused-p nil)) + (shell-command-to-string (concat emms-player-mpd-command-name " play"))) (defun emms-player-mpd-start (track) "Starts a process playing TRACK." @@ -191,18 +191,12 @@ This handles both m3u and pls type playlists." (defun emms-player-mpd-stop () "Stop the currently playing song." (interactive) - (shell-command-to-string (concat emms-player-mpd-command-name " stop")) - (setq emms-player-mpd-paused-p nil)) + (shell-command-to-string (concat emms-player-mpd-command-name " stop"))) (defun emms-player-mpd-pause () "Pause the currently playing song." (interactive) - (if emms-player-mpd-paused-p - (progn - (shell-command-to-string (concat emms-player-mpd-command-name " play")) - (setq emms-player-mpd-paused-p nil)) - (shell-command-to-string (concat emms-player-mpd-command-name " pause")) - (setq emms-player-mpd-paused-p t))) + (shell-command-to-string (concat emms-player-mpd-command-name " toggle"))) (defun emms-player-mpd-seek (sec) "Seek backward or forward by SEC seconds, depending on sign of SEC." @@ -220,14 +214,12 @@ This handles both m3u and pls type playlists." (defun emms-player-mpd-next () "Move forward by one track in MusicPD's internal playlist." (interactive) - (shell-command-to-string (concat emms-player-mpd-command-name " next")) - (setq emms-player-mpd-paused-p nil)) + (shell-command-to-string (concat emms-player-mpd-command-name " next"))) (defun emms-player-mpd-previous () "Move backward by one track in MusicPD's internal playlist." (interactive) - (shell-command-to-string (concat emms-player-mpd-command-name " previous")) - (setq emms-player-mpd-paused-p nil)) + (shell-command-to-string (concat emms-player-mpd-command-name " previous"))) ;; A "Now Playing" function -- I don't know how to integrate this into ;; emms-show. |