From c05ccf0803530d8fddbcb58dc92daa3546469379 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Thu, 6 Jul 2006 11:25:00 +0000 Subject: browser: use generated name on top level enteries this fixes a bug where 'various' albums end up being classified under the first author of the first various album darcs-hash:20060706112523-4e3e3-b5fc3f33b7996292ce11ef38b111fd3df96e83f6.gz --- emms-browser.el | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/emms-browser.el b/emms-browser.el index 77604db..661d8db 100644 --- a/emms-browser.el +++ b/emms-browser.el @@ -427,7 +427,8 @@ compilations, etc." (maphash (lambda (path track) (unless (run-hook-with-args-until-success 'emms-browser-filter-tracks-hook track) - (setq field (emms-browser-get-track-field track type)) + (setq field + (emms-browser-get-track-field track type)) (setq existing-entry (gethash field hash)) (if existing-entry (puthash field (cons track existing-entry) hash) @@ -457,8 +458,7 @@ compilations, etc." (defun emms-browser-insert-top-level-entry (name tracks type) "Insert a single top level entry into the buffer." (emms-browser-ensure-browser-buffer) - (let ((bdata (emms-browser-make-bdata-tree - type 1 tracks))) + (let ((bdata (emms-browser-make-bdata-tree type 1 tracks name))) (emms-browser-insert-format bdata))) ;; -------------------------------------------------- @@ -474,14 +474,12 @@ Eg. if CURRENT-MAPPING is currently 'info-artist, return 'info-album." ((eq current-mapping 'info-genre) 'info-artist) ((eq current-mapping 'info-year) 'info-artist))) -(defun emms-browser-make-bdata-tree (type level tracks) +(defun emms-browser-make-bdata-tree (type level tracks name) "Build a tree of browser DB elements for tracks." (emms-browser-make-bdata (emms-browser-make-bdata-tree-recurse type level tracks) - ;; with the current hash code, we're guaranteed to have only one - ;; element at the top - (emms-track-get (car tracks) type) + name type level)) (defun emms-browser-make-bdata-tree-recurse (type level tracks) -- cgit v1.2.3