emms-patches
[Top][All Lists]
Advanced

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

[Emms-patches] darcs patch: emms-player-mpd: Make seek work correctly.


From: Michael Olson
Subject: [Emms-patches] darcs patch: emms-player-mpd: Make seek work correctly.
Date: Thu, 25 May 2006 14:25:14 -0400

Wed May 24 23:31:20 EDT 2006  Michael Olson <address@hidden>
  * emms-player-mpd: Make seek work correctly.
New patches:

[emms-player-mpd: Make seek work correctly.
Michael Olson <address@hidden>**20060525033120] {
hunk ./emms-player-mpd.el 908
-(defun emms-player-mpd-seek (sec)
-  "Seek backward or forward by SEC seconds, depending on sign of SEC."
+(defun emms-player-mpd-seek (amount)
+  "Seek backward or forward by AMOUNT seconds, depending on sign of AMOUNT."
hunk ./emms-player-mpd.el 911
-  (emms-player-mpd-send (format "seek %s%d"
-                                (if (> sec 0) "+" "")
-                                sec)
-                        nil #'ignore))
+  (emms-player-mpd-get-status
+   amount
+   (lambda (amount info)
+     (let ((song (emms-player-mpd-get-current-song nil #'ignore info))
+           (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)))
+          nil #'ignore))))))
}

Context:

[emms-player-mpd: Use more robust method of detecting whether we need to 
force-feed MusicPD our playlist.
Michael Olson <address@hidden>**20060525014253] 
[emms-playlist-mode: Make "d" kill the entire line.  This seems to be a good 
compromise of those who use C-k and those who want more standard object-killing 
behavior.
foo**20060524200008] 
[emms-player-mpd: When showing the currently-playing song, prepend the name of 
the radio station, if it exists.
foo**20060524195911] 
[emms-player-mpd: Fix bug that caused unconditional reloading of the entire 
MusicPD playlist whenever the track was changed manually.
Michael Olson <address@hidden>**20060524061655] 
[emms-player-mpd: Overhaul for streamlist support, and fix a few miscellaneous 
issues.
Michael Olson <address@hidden>**20060524055707] 
[emms-player-mpd: Add a few checks to make sure that the given buffer exists 
before trying to do anything with it.
Michael Olson <address@hidden>**20060517035419] 
[emms-source-playlist: Do not expand names of files in playlists, as this can 
cause problems with emms-player-mpd in some configurations.
Michael Olson <address@hidden>**20060516081257] 
[emms-playlist-mode: Implement the option (disabled by default) of opening a 
new EMMS buffer for a playlist, when hitting RET on one.
Michael Olson <address@hidden>**20060510040730] 
[emms-playlist-mode.el: Don't put a period after the mode map. This hangs 21.4 
on display.
address@hidden 
[TAG 2.0
address@hidden 
Patch bundle hash:
4ec7111b5cd63c71e59ded0f7de6f5d18243204e

reply via email to

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