diff options
author | Damien Elmes <emms@repose.cx> | 2006-07-06 07:31:00 +0000 |
---|---|---|
committer | Damien Elmes <emms@repose.cx> | 2006-07-06 07:31:00 +0000 |
commit | 1772f4f391923e955910bc35582361f0f8023ef8 (patch) | |
tree | e56ef9e1e76ce91070baa4dc6d52747530eba078 | |
parent | d17aadfe7faa32710766b9d5f3b7a6e59361a2cd (diff) |
browser: add lookup of artist/album in wikipedia
darcs-hash:20060706073102-4e3e3-0d7410b08c4748a26b252025090beeffb9f77791.gz
-rw-r--r-- | emms-browser.el | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/emms-browser.el b/emms-browser.el index 588d32b..1dd4980 100644 --- a/emms-browser.el +++ b/emms-browser.el @@ -267,6 +267,8 @@ Use nil for no sorting." (define-key map (kbd "s A") 'emms-browser-search-by-album) (define-key map (kbd "s t") 'emms-browser-search-by-title) (define-key map (kbd "s s") 'emms-browser-search-by-names) + (define-key map (kbd "W A") 'emms-browser-lookup-artist-on-wikipedia) + (define-key map (kbd "W a") 'emms-browser-lookup-album-on-wikipedia) map) "Keymap for `emms-browser-mode'.") @@ -982,6 +984,25 @@ Return the previous point-max before adding." (with-current-emms-playlist (emms-playlist-clear))) +(defun emms-browser-lookup-wikipedia (field) + (let ((data + (emms-track-get (emms-browser-bdata-first-track + (emms-browser-bdata-at-point)) + field))) + (when data + (browse-url + (concat + "http://en.wikipedia.org/wiki/Special:Search?search=" + data))))) + +(defun emms-browser-lookup-artist-on-wikipedia () + (interactive) + (emms-browser-lookup-wikipedia 'info-artist)) + +(defun emms-browser-lookup-album-on-wikipedia () + (interactive) + (emms-browser-lookup-wikipedia 'info-album)) + ;; -------------------------------------------------- ;; Linked browser and playlist windows ;; -------------------------------------------------- |