aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Olson <mwolson@gnu.org>2006-08-04 18:53:00 +0000
committerMichael Olson <mwolson@gnu.org>2006-08-04 18:53:00 +0000
commit3bcb9452259783c843444e0342468d2b566ab38f (patch)
treef3d48702a479288c13cbc81d797ac4ea660454c7
parent1359311d1d86162b1e0374afdc0dc28a9cd1d9eb (diff)
emms-player-mpd: Use better logic for last patch.
darcs-hash:20060804185308-1bfb2-ae78a2fb0939d2265454d088eee6881b780f89be.gz
-rw-r--r--emms-player-mpd.el27
1 files changed, 13 insertions, 14 deletions
diff --git a/emms-player-mpd.el b/emms-player-mpd.el
index e01c7da..678382f 100644
--- a/emms-player-mpd.el
+++ b/emms-player-mpd.el
@@ -1071,20 +1071,19 @@ If INFO is specified, use that instead of acquiring the necessary
info from MusicPD."
(if info
(emms-info-mpd-process track info)
- (let (file)
- (when (or emms-player-mpd-music-directory
- (and (eq 'file (emms-track-type track))
- (setq file (emms-player-mpd-get-mpd-filename
- (emms-track-name track)))
- (string-match emms-player-mpd-supported-regexp file)
- (not (string-match "\\`http://" file))))
- (condition-case nil
- (emms-player-mpd-send
- (concat "find filename "
- (emms-player-mpd-quote-file file))
- track
- #'emms-info-mpd-1)
- (error nil))))))
+ (when (and (eq 'file (emms-track-type track))
+ (not (string-match "\\`http://" file)))
+ (let ((file (emms-player-mpd-get-mpd-filename (emms-track-name track))))
+ (when (or emms-player-mpd-music-directory
+ (and file
+ (string-match emms-player-mpd-supported-regexp file)))
+ (condition-case nil
+ (emms-player-mpd-send
+ (concat "find filename "
+ (emms-player-mpd-quote-file file))
+ track
+ #'emms-info-mpd-1)
+ (error nil)))))))
;;; Caching