Hi Triode,
I would need to patch your "ProtocolHandler.pm", but I am not sure how
it can be done. I would need some help how the spotifydeamon works with
libspotify.
I tried this:
Code:
--------------------
sub new {
# my ($class, $args) = @_;
#
# my $client = $args->{'client'};
#
# if ($args->{'url'} =~
/spotify:artist|spotify:album|spotify:user:.*:playlist/) {
# return undef;
# }
#
# $log->warn("Spotify client not supported: " . $client->model);
#
# $client->showBriefly({ line => [ string('PLUGIN_SPOTIFY'),
string('PLUGIN_SPOTIFY_PLAYER_NOT_SUPPORTED') ] },
# { block => 1, duration => 5 });
#
# return undef;
my $class = shift;
my $args = shift;
my $client = $args->{client};
my $song = $client->streamingSong;
my $streamUrl = $song->streamUrl() || return;
# my $track = $song->pluginData();
$log->info("Playing remote via spotifyd: $streamUrl");
my $song = $client->streamingSong;
my $host = Slim::Utils::Network::serverAddr();
my $port = $prefs->get('httpport');
# for clients connecting on localhost always use localhost address to
connect to helper
if ($client->ip eq '127.0.0.1') {
$host = '127.0.0.1';
}
$streamUrl =~ s{^spotify://}{spotify:};
$streamUrl = "http://$host:$port/$streamUrl";
#$song->streamUrl($streamUrl);
main::DEBUGLOG && $log->is_debug && $log->debug( 'Remote streaming
Spotify track: ' . $streamUrl );
my $sock = $class->SUPER::new( {
url => $streamUrl,
song => $song,
client => $client,
bitrate => 320_000,
} ) || return;
${*$sock}{contentType} = 'audio/mpeg';
$log->info("returning socket for Spotify: " . $sock);
return $sock;
}
--------------------
But to no avail. If I do not use
Code:
--------------------
use base qw(Slim::Player::Protocols::HTTP);
--------------------
the code is at least used.
If I add the base to HTTP, the code is never used. I don't get any log
output.
Was there a reason to not add the ProtocolHandler new method as it is
provided by all Plugins that are delivered with LMS?
Regards Klaas
Creator of *BrutefirDrc* see
http://sourceforge.net/projects/brutefirdrc/
Hardware:
Squeezebox v3 with digital out tweaking and custom power supply or/and
AUDIO GD USB Sound Card, Tact TDA2200 Digital Amplifier, MBL 311-D
Speaker, Velodyne Subwoofer
------------------------------------------------------------------------
Klaas's Profile: http://forums.slimdevices.com/member.php?userid=8026
View this thread: http://forums.slimdevices.com/showthread.php?t=79706
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins