[SlimDevices: Beta] 'Artist - Title from Album' possible w/ Pandora or Slacker?

Andy Grundman andy at slimdevices.com
Mon Dec 17 14:07:55 PST 2007


On Dec 17, 2007, at 4:40 PM, atlslim wrote:

>
> Andy Grundman;249681 Wrote:
>> BTW, you don't need a biography plugin with Slacker, you can get AMG
>> bios and reviews right from the Slacker trackinfo menu. :)
>
> Understood and Slacker is a great addition by-the-way!!
>
> My interest is when using the Nokia770. Ben has the biography plugin
> link built into the skin at the end of the song title line. With  
> artist
> info appearing first the artist bio is 1-click away.

What happens if you change your title format pref to put something  
else first?  You can get the Pandora or Slacker metadata using the  
following code, this is the right way to get the artist rather than  
parsing the title:

my $handler = Slim::Player::ProtocolHandlers->handlerFor($url); # $url  
is pandora://... or slacker://...
if ( $handler && $handler->can('getMetadataFor') {
     my $meta = $handler->getMetadataFor( $client, $url );
}

$meta is a hashref containing artist, album, title, cover URL, etc.   
This is the method used by the web UI as well as Jive for displaying  
remote metadata.

It currently works for Pandora, Slacker, MP3tunes, Rhapsody, and  
Live365.


More information about the beta mailing list