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: Tassilo Horn
Subject: Re: [emms-help] Can emms-lastfm display track info, such as aritist?
Date: Sun, 10 Feb 2008 20:38:40 +0100
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.60 (gnu/linux)

William Xu <address@hidden> writes:

Hi William,

> 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?

There's

,----[ C-h f emms-lastfm-radio-skip RET ]
| emms-lastfm-radio-skip is an interactive compiled Lisp function in 
`emms-lastfm.el'.
| (emms-lastfm-radio-skip)
| 
| Inform Last.fm that you want to skip the currently playing
| song.
`----

and

,----[ C-h f emms-lastfm-radio-ban RET ]
| emms-lastfm-radio-ban is an interactive compiled Lisp function in 
`emms-lastfm.el'.
| (emms-lastfm-radio-ban)
| 
| Inform Last.fm that you want to ban the currently playing
| song.
`----

Both will skip to the next song.  The latter will ensure that you'll
never hear it again, too.  For completness, there's

,----[ C-h f emms-lastfm-radio-love RET ]
| emms-lastfm-radio-love is an interactive compiled Lisp function in 
`emms-lastfm.el'.
| (emms-lastfm-radio-love)
| 
| Inform Last.fm that you love the currently playing song.
`----

too.

> 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: 
>
> 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))))

Looks good to me.

> Third, emms-all is lack of one line setup for emms-lastfm in the ";;
> setup" section, namely: 
>
> ,----
> | (emms-lastfm-enable)
> `----
>
> Right?

No, I think this is intentional.  What about users that use that setup
to get another feature but don't want to use Last.fm?  I think they will
get error messages because the lastfm user/password are unset and
stuff...

Bye,
Tassilo




reply via email to

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