From: Jose Antonio Ortega Ruiz <[email protected]>
Hi,
These two patches address an issue i'm encountering when using lastfm
integration
and mpd as the player. After requesting streaming from last.fm, a new track gets
added to EMMS' database, which is named after the streaming URL but has no other
fields. Thus, when adding entries or making searches, checking the the field
at hand is non-nil is needed. This patch checks that for
emms-browser-make-hash-by.
Thanks!
jao
---
lisp/emms-browser.el | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/lisp/emms-browser.el b/lisp/emms-browser.el
index dd1d316..1c0b699 100644
--- a/lisp/emms-browser.el
+++ b/lisp/emms-browser.el
@@ -656,10 +656,11 @@ compilations, etc."
'emms-browser-filter-tracks-hook track)
(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)
- (puthash field (list track) hash))))
+ (when field
+ (setq existing-entry (gethash field hash))
+ (if existing-entry
+ (puthash field (cons track existing-entry) hash)
+ (puthash field (list track) hash)))))
emms-cache-db)
hash))
--
1.6.2
_______________________________________________
Emms-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emms-patches