aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorMichael Olson <mwolson@gnu.org>2008-07-16 23:30:59 -0700
committerMichael Olson <mwolson@gnu.org>2008-07-16 23:30:59 -0700
commita31cdb0104a6ee08761cdca69c31f3671205ac30 (patch)
treef0793fe1e8a08593ea9d74c328cd237e3b96b084 /lisp
parent50dab1d731182939f48ff2c5196c98499c4103a1 (diff)
emms-player-mpd: Only try once to read tracks after running out of them.
This fixes a bug introduced in the last commit.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/emms-player-mpd.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/emms-player-mpd.el b/lisp/emms-player-mpd.el
index c1ad17b..692bd83 100644
--- a/lisp/emms-player-mpd.el
+++ b/lisp/emms-player-mpd.el
@@ -664,15 +664,17 @@ main EMMS playlist buffer."
"clearerror"
nil #'ignore))
(cond ((string= state "stop")
- (setq emms-player-mpd-last-state "stop")
(if song
;; a track remains: the user probably stopped MusicPD
;; manually, so we'll stop EMMS completely
(let ((emms-player-stopped-p t))
+ (setq emms-player-mpd-last-state "stop")
(emms-player-stopped))
;; no more tracks are left: we probably ran out of things
;; to play, so let EMMS do something further if it wants
- (emms-player-stopped)))
+ (unless (string= emms-player-mpd-last-state "stop")
+ (setq emms-player-mpd-last-state "stop")
+ (emms-player-stopped))))
((and emms-player-mpd-last-state
(string= emms-player-mpd-last-state "stop"))
;; resume from a stop that occurred outside of EMMS