I would suggest you use the "status" query (as documented in the 'CLI
rather than to try to grab the information from the track object
yourself. That's what all the other UIs do, and it does the difficult
part for you.

  # request the current player's status. Starting with the current track ('-'), 
grab information for one single track:
  my $r = $client->execute(['status', '-', 1, 'tags:aKl']);
  # playlist_loop of the response is a list of track information hashes. We 
only have requested on - grab it:
  my $track = $r->getResult('playlist_loop')->[0];
  # extract the nice pieces of information from the $track hash ref:
  my $artist = $track->{artist};
  my $album = $track->{album};
  my $title = $track->{title};


http://www.herger.net/slim-plugins - Spotty, MusicArtistInfo
mherger's Profile: http://forums.slimdevices.com/member.php?userid=50
View this thread: http://forums.slimdevices.com/showthread.php?t=108743

discuss mailing list

Reply via email to