[Slim-Checkins] r12669 - /trunk/server/Slim/Plugin/Pandora/ProtocolHandler.pm

andy at svn.slimdevices.com andy at svn.slimdevices.com
Wed Aug 22 11:01:04 PDT 2007


Author: andy
Date: Wed Aug 22 11:01:04 2007
New Revision: 12669

URL: http://svn.slimdevices.com?rev=12669&view=rev
Log:
When calling setCurrentTitle in the Pandora plugin, it actually needs to also call the S::M::I::setCurrentTitle method so it can update the display

Modified:
    trunk/server/Slim/Plugin/Pandora/ProtocolHandler.pm

Modified: trunk/server/Slim/Plugin/Pandora/ProtocolHandler.pm
URL: http://svn.slimdevices.com/trunk/server/Slim/Plugin/Pandora/ProtocolHandler.pm?rev=12669&r1=12668&r2=12669&view=diff
==============================================================================
--- trunk/server/Slim/Plugin/Pandora/ProtocolHandler.pm (original)
+++ trunk/server/Slim/Plugin/Pandora/ProtocolHandler.pm Wed Aug 22 11:01:04 2007
@@ -138,7 +138,7 @@
 		# We didn't get the next track to play
 		my $url = Slim::Player::Playlist::url($client);
 
-		setCurrentTitle( $client, $client->string('PLUGIN_PANDORA_NO_TRACKS') );
+		setCurrentTitle( $client, $url, $client->string('PLUGIN_PANDORA_NO_TRACKS') );
 		
 		$client->update();
 
@@ -348,7 +348,7 @@
 				  . $track->{artistName} . ' ' . $client->string('FROM') . ' '
 				  . $track->{albumName};
 		
-		setCurrentTitle( $client, $title );
+		setCurrentTitle( $client, $url, $title );
 		
 		# Remove the previous track metadata
 		$client->pluginData( prevTrack => 0 );
@@ -446,11 +446,15 @@
 }
 
 sub setCurrentTitle {
-    my ( $client, $title ) = @_;
-    
-    # We can't use the normal setCurrentTitle method because it would cause multiple
-    # players playing the same station to get the same titles
-    $client->pluginData( currentTitle => $title );
+	my ( $client, $url, $title ) = @_;
+	
+	# We can't use the normal getCurrentTitle method because it would cause multiple
+	# players playing the same station to get the same titles
+	$client->pluginData( currentTitle => $title );
+	
+	# Call the normal setCurrentTitle method anyway, so it triggers callbacks to
+	# update the display
+	Slim::Music::Info::setCurrentTitle( $url, $title );
 }
 
 sub getCurrentTitle {



More information about the checkins mailing list