1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-24 04:33:24 +00:00

Fix the LastFM plugin. It was broken due to the FreeBSD version of JSON::XS

being newer than expected and the general workaround not being implemented in
this plugin.

Submitted by:	tdb
This commit is contained in:
Brooks Davis 2008-10-07 14:51:08 +00:00
parent ab7f066e29
commit b2f60ceeec
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=221305
4 changed files with 48 additions and 2 deletions

View File

@ -7,7 +7,7 @@
PORTNAME= squeezecenter
PORTVERSION= 7.2.0
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= audio
MASTER_SITES= http://downloads.slimdevices.com/SqueezeCenter_v${PORTVERSION}/
DISTNAME= ${PORTNAME}-${PORTVERSION:S/.0//}-noCPAN

View File

@ -0,0 +1,23 @@
$FreeBSD$
--- Slim/Plugin/LastFM/ProtocolHandler.pm.orig
+++ Slim/Plugin/LastFM/ProtocolHandler.pm
@@ -7,7 +7,7 @@
use strict;
use base qw(Slim::Player::Protocols::HTTP);
-use JSON::XS qw(from_json);
+use JSON::XS qw(decode_json);
use URI::Escape qw(uri_escape_utf8);
use Slim::Player::Playlist;
@@ -155,7 +155,7 @@
my $client = $http->params->{client};
my $params = $http->params->{params};
- my $track = eval { from_json( $http->content ) };
+ my $track = eval { decode_json( $http->content ) };
if ( $@ || $track->{error} ) {
# We didn't get the next track to play

View File

@ -7,7 +7,7 @@
PORTNAME= squeezecenter
PORTVERSION= 7.2.0
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= audio
MASTER_SITES= http://downloads.slimdevices.com/SqueezeCenter_v${PORTVERSION}/
DISTNAME= ${PORTNAME}-${PORTVERSION:S/.0//}-noCPAN

View File

@ -0,0 +1,23 @@
$FreeBSD$
--- Slim/Plugin/LastFM/ProtocolHandler.pm.orig
+++ Slim/Plugin/LastFM/ProtocolHandler.pm
@@ -7,7 +7,7 @@
use strict;
use base qw(Slim::Player::Protocols::HTTP);
-use JSON::XS qw(from_json);
+use JSON::XS qw(decode_json);
use URI::Escape qw(uri_escape_utf8);
use Slim::Player::Playlist;
@@ -155,7 +155,7 @@
my $client = $http->params->{client};
my $params = $http->params->{params};
- my $track = eval { from_json( $http->content ) };
+ my $track = eval { decode_json( $http->content ) };
if ( $@ || $track->{error} ) {
# We didn't get the next track to play