aboutsummaryrefslogtreecommitdiff
path: root/emms-player-mpd.el
diff options
context:
space:
mode:
authorMichael Olson <mwolson@gnu.org>2006-01-03 04:04:00 +0000
committerMichael Olson <mwolson@gnu.org>2006-01-03 04:04:00 +0000
commit76389c6781d42947ce36fa8b260391935532a941 (patch)
tree24238cead6b672b77e7bd7c2a5a2f8d9d818d51a /emms-player-mpd.el
parent18153aafcfee4135aefe846072dffe737a299d6f (diff)
emms-player-mpd: Docfix, wait 200 millisecs for process to start, add more output when verbose mode is enabled.
darcs-hash:20060103040456-1bfb2-1c56881762563b193eee69dfbf1d4b0f033b962c.gz
Diffstat (limited to 'emms-player-mpd.el')
-rw-r--r--emms-player-mpd.el37
1 files changed, 29 insertions, 8 deletions
diff --git a/emms-player-mpd.el b/emms-player-mpd.el
index 6384c2a..a236e58 100644
--- a/emms-player-mpd.el
+++ b/emms-player-mpd.el
@@ -56,15 +56,31 @@
;;; EMMS setup
-;; Add "emms-player-mpd" to the top of `emms-player-list'. If you use
-;; absolute file names in your m3u playlists (which is most likely),
-;; make sure you set `emms-player-mpd-music-directory' to the value of
-;; "music_directory" from your MusicPD config.
+;; Add the following to your config.
+;;
+;; (require 'emms-player-mpd)
-;; To get track info from MusicPD, do the following.
+;; Adjust `emms-player-mpd-server-name' and
+;; `emms-player-mpd-server-port' to match the location and port of
+;; your MusicPD server.
+;;
+;; (setq emms-player-mpd-server-name "localhost")
+;; (setq emms-player-mpd-server-port "6600")
+;; To get track info from MusicPD, do the following.
+;;
;; (add-to-list 'emms-info-functions 'emms-info-mpd)
+;; Add 'emms-player-mpd to the top of `emms-player-list'.
+;;
+;; (add-to-list 'emms-player-list 'emms-player-mpd)
+
+;; If you use absolute file names in your m3u playlists (which is most
+;; likely), make sure you set `emms-player-mpd-music-directory' to the
+;; value of "music_directory" from your MusicPD config. There are
+;; additional options available as well, but the defaults should be
+;; sufficient for most uses.
+
;;; TODO
;; If you try to play individual songs, the tracks will not advance.
@@ -178,9 +194,12 @@ and errors."
(when emms-player-mpd-verbose
(message "Closed MusicPD process"))
(setq emms-player-mpd-process nil))
- ((memq status '(run listen open))
+ ((memq status '(run open))
+ (when emms-player-mpd-verbose
+ (message "MusicPD process started successfully")))
+ (t
(when emms-player-mpd-verbose
- (message "MusicPD process started successfully"))))))
+ (message "Other MusicPD status change: %s" status))))))
(defun emms-player-mpd-filter (proc string)
"The process filter for MusicPD."
@@ -202,7 +221,9 @@ and errors."
'emms-player-mpd-filter)
(if (fboundp 'set-process-query-on-exit-flag)
(set-process-query-on-exit-flag emms-player-mpd-process nil)
- (process-kill-without-query emms-player-mpd-process))))
+ (process-kill-without-query emms-player-mpd-process))
+ ;; wait a bit for the process to finish starting
+ (accept-process-output emms-player-mpd-process 0 200)))
(defun emms-player-mpd-send (command)
"Send the given COMMAND to the MusicPD server."