kimmos;560564 Wrote:
> Triode -- Thank you for the plugin!! This was the one music source that
> was missing on my Squeezeboxen. It is running great on Ubuntu 10.04
> x86_64 (with ia32-libs installed).
>
>
>
> The getMetadataFor() method is called with a 4th argument
> "$forceCurrent" from the AudioScrobbler plugin. The Spotify plugin
> itself doesn't seem to be using the "$_song" argument, so I just
> deleted that code (basically ignoring "$forceCurrent").
>
> I looked at the getMetadataFor() method in the
> Pandora/ProtocolHandler.pm and it seems to use "$forceCurrent" to
> select between "currently streaming" and "currently playing" metadata
> (whatever that means to it -- didn't dig into it yet):
>
> my $song = $forceCurrent ? $client->streamingSong() :
> $client->playingSong();
>
> >
Code:
--------------------
> >
> --- ProtocolHandler.pm.orig 2010-07-03 22:15:50.000000000 -0400
> +++ ProtocolHandler.pm 2010-07-08 21:35:20.135958178 -0400
> @@ -28,11 +28,11 @@
> sub getFormatForURL { 'flc' }
>
> sub getMetadataFor {
> - my ($class, $client, $url, $_song) = @_;
> + my ($class, $client, $url, $forceCurrent) = @_;
>
> my $track = Slim::Schema::RemoteTrack->fetch($url);
>
> - if ($track && ($track->artistname || $track->albumname) && !$_song)
{
> + if ($track && ($track->artistname || $track->albumname)) {
>
> my $coverid = $track->cover;
>
> @@ -75,13 +75,6 @@
> tracknum=> $track->{'index'},
> });
>
> - if ($_song) {
> -
> - $log->info("updating temporary
duration for url: $url to $secs");
> -
> - $_song->duration($secs);
> - }
> -
> delete $fetching{$url};
> },
>
>
--------------------
> >
>
> So far I've been getting correct scrobbles, including "now playing"
> info.
>
> P.S. I get no cover art on the Controller display (playing back
> through Receiver -- haven't tried playback on controller w/ Spotify
> yet). However, cover art in the web interface is just fine. Any ideas
> on fix or where to look?
Thanks for this - looks like me adding an extra parameter clashes with
AudioScrobbler. I will update the plugin. Note what you have deleted
there is some code to handle a corner case for spotify when there is no
duration due to the number of tracks exceeding the playlist cache.
--
Triode
------------------------------------------------------------------------
Triode's Profile: http://forums.slimdevices.com/member.php?userid=17
View this thread: http://forums.slimdevices.com/showthread.php?t=79706
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins