[Slim-Checkins] r8835 - /trunk/server/Slim/Player/Squeezebox2.pm

andy at svn.slimdevices.com andy at svn.slimdevices.com
Sun Aug 6 11:03:48 PDT 2006


Author: andy
Date: Sun Aug  6 11:03:47 2006
New Revision: 8835

URL: http://svn.slimdevices.com?rev=8835&view=rev
Log:
Allow protocol handlers to deny shouldLoop (for SN and Pandora)

Modified:
    trunk/server/Slim/Player/Squeezebox2.pm

Modified: trunk/server/Slim/Player/Squeezebox2.pm
URL: http://svn.slimdevices.com/trunk/server/Slim/Player/Squeezebox2.pm?rev=8835&r1=8834&r2=8835&view=diff
==============================================================================
--- trunk/server/Slim/Player/Squeezebox2.pm (original)
+++ trunk/server/Slim/Player/Squeezebox2.pm Sun Aug  6 11:03:47 2006
@@ -570,6 +570,12 @@
 	# Ask the client if the track is small enough for this
 	return 0 unless ($client->canLoop($audio_size));
 	
+	# Check with the protocol handler
+	my $handler = Slim::Player::ProtocolHandlers->handlerForURL($url);
+	if ( $handler && $handler->can('shouldLoop') ) {
+		return $handler->shouldLoop($audio_size, $url);
+	}
+	
 	return 1;
 }
 



More information about the checkins mailing list