emms-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [emms-help] Can emms-lastfm display track info, such as aritist?


From: William Xu
Subject: Re: [emms-help] Can emms-lastfm display track info, such as aritist?
Date: Mon, 11 Feb 2008 01:18:28 +0900
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (darwin)

Yoni Rabkin <address@hidden> writes:

> Works fine here. I see the above only in the playlist, the mode line
> shows the correct metadata.
>
> I'm using forcer's repo.

Seems I'm unable to connect to forcer's repo. Anyway, I pulled 4 patches
from Tassilo's repo. While this doesn't seem to be the cause, instead,
it looks like related to the way I play emms-lastfm. This is how I use
emms-lastfm: 

,----
| M-x emms-lastfm-radio-similar-artists "Jay Chou"
`----

If I just leave it alone, and listening song by song, mode line display
gets updated correctly every emms-lastfm-radio-metadata-period,
IIUC. But, say, I don't like current track, and wish to skip to next
track in lastfm. As I didn't find anything like emms-lastfm-next, etc,
I run M-x emms-stop, M-x emms-start. At this time, I find that
emms-lastfm-timer now is nil, thus mode line will not get updated from
now on. How about providing a emms-lastfm-next?

Second, I find emms-lastfm-radio-get-handshake-url is modifying
emms-mode-line-string directly, which i thought should be left to 
be controlled by emms-track-description-function. How about this patch: 

---------------------------------8<------------------------------------- 
diff -rN -u old-emms/emms-lastfm.el new-emms/emms-lastfm.el
--- old-emms/emms-lastfm.el     2008-02-11 01:03:57.000000000 +0900
+++ new-emms/emms-lastfm.el     2008-02-11 01:03:57.000000000 +0900
@@ -355,7 +355,7 @@
 
 (defun emms-lastfm-radio-get-handshake-url ()
   (concat emms-lastfm-radio-base-url
-          "handshake.php?version=" (number-to-string 
+          "handshake.php?version=" (number-to-string
                                     emms-lastfm-client-version)
           "&platform="              emms-lastfm-client-id
           "&username="              (emms-escape-url emms-lastfm-username)
@@ -562,11 +562,12 @@
   (let ((buffer (current-buffer)))
     (emms-http-decode-buffer buffer)
     (let ((artist (emms-key-value "artist" buffer))
-          (title  (emms-key-value "track" buffer)))
+          (title  (emms-key-value "track" buffer))
+          (track (emms-playlist-current-selected-track)))
       (kill-buffer buffer)
-      (setq emms-mode-line-string (format emms-mode-line-format
-                                          (concat artist " - " title)))
-      (force-mode-line-update))))
+      (emms-track-set track 'info-artist artist)
+      (emms-track-set track 'info-title title)
+      (emms-track-updated track))))
---------------------------------8<------------------------------------- 

Third, emms-all is lack of one line setup for emms-lastfm in the ";;
setup" section, namely: 

,----
| (emms-lastfm-enable)
`----

Right?

-- 
William

http://williamxu.net9.org




reply via email to

[Prev in Thread] Current Thread [Next in Thread]