emms-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emms-patches] [commit][master] emms-player-mpd: Only try once to read t


From: mwolson
Subject: [Emms-patches] [commit][master] emms-player-mpd: Only try once to read tracks after running out of them.
Date: Thu, 17 Jul 2008 02:40:08 -0400

commit a31cdb0104a6ee08761cdca69c31f3671205ac30
Author: Michael Olson <address@hidden>
Date:   Wed Jul 16 23:30:59 2008 -0700

    emms-player-mpd: Only try once to read tracks after running out of them.
    
    This fixes a bug introduced in the last commit.

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]