patch-Slim_Plugin_LastFM_ProtocolHandler_pm 846 B

123456789101112131415161718192021222324
  1. support current JSON::XS version, diff from FreeBSD ports.
  2. $OpenBSD: patch-Slim_Plugin_LastFM_ProtocolHandler_pm,v 1.2 2009/01/28 01:36:00 sthen Exp $
  3. --- Slim/Plugin/LastFM/ProtocolHandler.pm.orig Tue Jan 20 02:35:14 2009
  4. +++ Slim/Plugin/LastFM/ProtocolHandler.pm Wed Jan 21 01:28:36 2009
  5. @@ -7,7 +7,7 @@ package Slim::Plugin::LastFM::ProtocolHandler;
  6. use strict;
  7. use base qw(Slim::Player::Protocols::HTTP);
  8. -use JSON::XS qw(from_json);
  9. +use JSON::XS qw(decode_json);
  10. use URI::Escape qw(uri_escape_utf8);
  11. use Slim::Player::Playlist;
  12. @@ -141,7 +141,7 @@ sub _gotNextTrack {
  13. my $client = $http->params->{client};
  14. my $params = $http->params->{params};
  15. - my $track = eval { from_json( $http->content ) };
  16. + my $track = eval { decode_json( $http->content ) };
  17. if ( $@ || $track->{error} ) {
  18. # We didn't get the info to play