aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Elmes <emms@repose.cx>2006-07-05 13:34:00 +0000
committerDamien Elmes <emms@repose.cx>2006-07-05 13:34:00 +0000
commita3bb0ffba1588416cb4f630c9d2f99b8864d401c (patch)
treed9298d2294a5e9cf9265575e3b8fa3d65ddb9fcb
parenta6b5c7855486045daeff9db25e224896a2eb0f73 (diff)
browser: don't rely on target to determine track properties
Using 'track means that the format string symbols aren't generated properly. Note that these recent changes means that the browser and the playlist share the same face. It's not too hard to change this - what do you think? Should the browser and playlist track face be different? darcs-hash:20060705133450-4e3e3-0743a44a91f05f825f146eedf21163ff41d69db6.gz
-rw-r--r--emms-browser.el10
1 files changed, 6 insertions, 4 deletions
diff --git a/emms-browser.el b/emms-browser.el
index 94fd2fc..c9dd33a 100644
--- a/emms-browser.el
+++ b/emms-browser.el
@@ -746,14 +746,14 @@ Stops at the next line at the same level, or EOF."
"Insert a group description into the playlist buffer."
(let* ((type (emms-browser-bdata-type bdata))
(short-type (substring (symbol-name type) 5))
- (name (emms-browser-format-line bdata)))
+ (name (emms-browser-format-line bdata 'playlist)))
(with-current-emms-playlist
(goto-char (point-max))
(insert name "\n"))))
(defun emms-browser-playlist-insert-track (bdata)
"Insert a track into the playlist buffer."
- (let ((name (emms-browser-format-line bdata 'track))
+ (let ((name (emms-browser-format-line bdata 'playlist))
(track (car (emms-browser-bdata-data bdata))))
(with-current-emms-playlist
(goto-char (point-max))
@@ -1329,11 +1329,13 @@ If > album level, most of the track data will not make sense."
(setq str (emms-browser-format-spec str format-choices))
;; give tracks a 'boost' (covers take up an extra space)
- (when (eq type 'info-title)
+ (when (and (eq type 'info-title)
+ (> level 1))
(setq str (concat " " str)))
;; if we're in playlist mode, add a track
- (when (eq target 'track)
+ (when (and (eq target 'playlist)
+ (eq type 'info-title))
(setq props
(append props `(emms-track ,track))))