diff options
author | Damien Elmes <emms@repose.cx> | 2006-07-06 11:25:00 +0000 |
---|---|---|
committer | Damien Elmes <emms@repose.cx> | 2006-07-06 11:25:00 +0000 |
commit | c05ccf0803530d8fddbcb58dc92daa3546469379 (patch) | |
tree | 3fb448ada8eafb33d96bf1c1e33d3bcfe81cc201 | |
parent | cf84eab8b93a5ce922b64bc13954166b9847c8bc (diff) |
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
-rw-r--r-- | emms-browser.el | 12 |
1 files 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) |