Add the ability to stream Last.FM radio
Add support for listening to www.last.fm through the swisscenter interface, as well as adding the ability to 'scrobble' (report to last.fm on) the music that you listen to so that your profile is updated.
The description from the last.fm site:
''Last.fm is the flagship product from the team that designed the Audioscrobbler music engine. More than ten million times a day, Last.fm users 'scrobble' their tracks to our servers, helping to collectively build the world's largest social music platform.
Last.fm taps the wisdom of the crowds, leveraging each user's musical profile to make personalised recommendations, connect users who share similar tastes, provide custom radio streams, and much more.
It's never been this easy to share your taste and discover new music. Welcome to the social music revolution.''
The description from the last.fm site:
''Last.fm is the flagship product from the team that designed the Audioscrobbler music engine. More than ten million times a day, Last.fm users 'scrobble' their tracks to our servers, helping to collectively build the world's largest social music platform.
Last.fm taps the wisdom of the crowds, leveraging each user's musical profile to make personalised recommendations, connect users who share similar tastes, provide custom radio streams, and much more.
It's never been this easy to share your taste and discover new music. Welcome to the social music revolution.''
Leave a comment
PHP script to proxy the last.fm radio station is complete. It allows you to:
However, it appears that the showcenter is unable to play an MP3 stream via the 'mp3 playback' commands (with an [wiki:AOD] or mixed [wiki:AOD/POD]). As far as I can see, the only way is to use the 'radio streaming' function.
This is a shame because it prevents us from displaying a nice 'Now Playing' screen with all the details of the current track.
Limitations at the moment are:
- Authenticate your username password with last.fm
- Tune-in to a particular radio station
- Stream music.
- Obtain information on the track currently playing.
However, it appears that the showcenter is unable to play an MP3 stream via the 'mp3 playback' commands (with an [wiki:AOD] or mixed [wiki:AOD/POD]). As far as I can see, the only way is to use the 'radio streaming' function.
This is a shame because it prevents us from displaying a nice 'Now Playing' screen with all the details of the current track.
Limitations at the moment are:
- It takes about 20-30 seconds for the stream buffer on the showcenter to fill up and start playback. This means that last.fm won't start playing immediately.
- When you press 'stop' on the remote, the PHP script doesn't die. I think it might be something to do with Simese (I'll have to test it on an apache installation to see if this happens on that as well). The PHP script performing the streaming therefore has to be killed manually with task manager.
- You can't change station while the music is playing.
- You can't see the track details of what is currently playing.
PHP script to proxy the last.fm radio station is complete. It allows you to:
However, it appears that the showcenter is unable to play an MP3 stream via the 'mp3 playback' commands (with an [wiki:AOD] or mixed [wiki:AOD/POD]). As far as I can see, the only way is to use the 'radio streaming' function.
This is a shame because it prevents us from displaying a nice 'Now Playing' screen with all the details of the current track.
Limitations at the moment are:
- Authenticate your username password with last.fm
- Tune-in to a particular radio station
- Stream music.
- Obtain information on the track currently playing.
However, it appears that the showcenter is unable to play an MP3 stream via the 'mp3 playback' commands (with an [wiki:AOD] or mixed [wiki:AOD/POD]). As far as I can see, the only way is to use the 'radio streaming' function.
This is a shame because it prevents us from displaying a nice 'Now Playing' screen with all the details of the current track.
Limitations at the moment are:
- It takes about 20-30 seconds for the stream buffer on the showcenter to fill up and start playback. This means that last.fm won't start playing immediately.
- When you press 'stop' on the remote, the PHP script doesn't die. I think it might be something to do with Simese (I'll have to test it on an apache installation to see if this happens on that as well). The PHP script performing the streaming therefore has to be killed manually with task manager.
- You can't change station while the music is playing.
- You can't see the track details of what is currently playing.
The problem with the PHP script not dying has been confirmed as a bug in Simese and will be fixed with upcoming release 1.40 of Simese.
'Now Playing' screen successfully implemented for Last.FM - even downloads a random selection of artist photos to display on the screen.
'Now Playing' screen successfully implemented for Last.FM - even downloads a random selection of artist photos to display on the screen.
(In revision:853) Added support for Last.FM. Features added include:
Playback of the following Last.FM radio streams are supported:
Refs* 72
- Configuration options on the 'Internet Radio' config page, including separate username/password settings for each swisscenter user.
- Scrobbling of all tracks played via the Swisscenter_Configuration
- Playback of LastFM streams via a proxy script.
Playback of the following Last.FM radio streams are supported:
- Similar Artists radio
- Tag radio
- My station
- My recommendations
- My loved tracks
- My neighbourhood
Refs* 72
Last.FM support is currently* disabled* by default (even though it is fully implemented) because there are circumstances where a slow response from the last.fm server causes playback to stall towards the end of a song (at the point where SwissCenter scobbles the song).
I believe it will be necessary to refactor some of the last.fm code to use a short timeouot feature, and to cache any songs which cannot be scrobbled for later submission. There is also (imho) too many calls to authenticate the user when we should instead cache the authenticated session ID within the swisscenter session.
I believe it will be necessary to refactor some of the last.fm code to use a short timeouot feature, and to cache any songs which cannot be scrobbled for later submission. There is also (imho) too many calls to authenticate the user when we should instead cache the authenticated session ID within the swisscenter session.
Last.FM support is currently* disabled* by default (even though it is fully implemented) because there are circumstances where a slow response from the last.fm server causes playback to stall towards the end of a song (at the point where SwissCenter scobbles the song).
I believe it will be necessary to refactor some of the last.fm code to use a short timeouot feature, and to cache any songs which cannot be scrobbled for later submission. There is also (imho) too many calls to authenticate the user when we should instead cache the authenticated session ID within the swisscenter session.
I believe it will be necessary to refactor some of the last.fm code to use a short timeouot feature, and to cache any songs which cannot be scrobbled for later submission. There is also (imho) too many calls to authenticate the user when we should instead cache the authenticated session ID within the swisscenter session.
Last.FM support is currently* disabled* by default (even though it is fully implemented) because there are circumstances where a slow response from the last.fm server causes playback to stall towards the end of a song (at the point where SwissCenter scobbles the song).
I believe it will be necessary to refactor some of the last.fm code to use a short timeouot feature, and to cache any songs which cannot be scrobbled for later submission. There is also (imho) too many calls to authenticate the user when we should instead cache the authenticated session ID within the swisscenter session.
I believe it will be necessary to refactor some of the last.fm code to use a short timeouot feature, and to cache any songs which cannot be scrobbled for later submission. There is also (imho) too many calls to authenticate the user when we should instead cache the authenticated session ID within the swisscenter session.