Hi ! Lastfm provides some good music at very good rate, so I think it could be a great idea to have it as an input operator.
I've found a great documentation on the protocol there: http://gabistapler.de/blog/index.php?/archives/268-Play-last.fm-streams-without-the-player.html To sum-up things, here is the quick spec, where every communication with the server is done via some HTTP connection (shout or normal). Also, the first step is necessarily the first one, but the second may be done asynchronously, and it's sure for the others.. 1) Open a session, get some informations, in particular a distinguished url that we'll use to listen to our stream 2) set up the lastfm:// url we want to listen 3) Listen to our stream as a pure shout stream without ICY metas (in other words, pure mp3 stream...) 4) ask for current metadatas 5) Send comands like skip, love etc.. It's not clear wether you can listen to your stream before sending the lastfm:// request but I'd like to think it is :) My proposal for this operator would be: input.lastfm(~update_delay:1.,~url:"url",login:"login",pass:"pass") With url as optional, and update_delay being the delay between two metadata request. Then, we'll export some telnet/server functions, like: skip love update_metadatas set_url get_url Audio data may be available before setting lastfm:// if it is possible, but it may be blank, or only after setting lastfm:// url, depending on the implementation/possibilities. Of course, as the basic streaming is through http, all of this should be connected to http.ml, but that's where I'm not confident enough to start by my own.. I'm waiting for your comments ! Romain PS: We could also handle audioscrobbling as documented here: http://www.audioscrobbler.net/development/protocol/
