emms-help
[Top][All Lists]
Advanced

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

[emms-help] seeking in emm-player-mpd


From: David Engster
Subject: [emms-help] seeking in emm-player-mpd
Date: Sun, 21 Feb 2010 13:18:40 +0100
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1.92 (gnu/linux)

Another tiny patch: I noticed that when playing with cue sheets,
emms-cue-next/previous didn't work. This is due to mpd only accepting
full seconds as seeking time steps. I attached a patch for fixing this.

-David

diff --git a/lisp/emms-player-mpd.el b/lisp/emms-player-mpd.el
index fa8f911..d0ab9c5 100644
--- a/lisp/emms-player-mpd.el
+++ b/lisp/emms-player-mpd.el
@@ -993,7 +994,7 @@ from other functions."
            (secs (emms-player-mpd-get-playing-time nil #'ignore info)))
        (when (and song secs)
          (emms-player-mpd-send
-          (concat "seek " song " " (number-to-string (+ secs amount)))
+          (concat "seek " song " " (round (number-to-string (+ secs amount))))
           nil #'ignore))))))
 
 (defun emms-player-mpd-seek-to (pos)
@@ -1004,7 +1005,7 @@ from other functions."
    (lambda (pos song)
      (when (and song pos)
        (emms-player-mpd-send
-        (concat "seek " song " " (number-to-string pos))
+        (concat "seek " song " " (round (number-to-string pos)))
         nil #'ignore)))))
 
 (defun emms-player-mpd-next ()

reply via email to

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