[Slim-Checkins] r33747 - /7.7/trunk/server/Slim/Control/XMLBrowser.pm

[email protected]
Newsgroups gmane.music.equipment.slimdevices.cvs
Message-ID <[email protected]>
Author: ayoung
Date: Fri Dec  9 16:51:06 2011
New Revision: 33747

URL: http://svn.slimdevices.com/slim?rev=33747&view=rev
Log:
Add another defeatDestructiveTouchToPlay option:
4: only defeat touch-to-play if playing something other than radio.

Modified:
    7.7/trunk/server/Slim/Control/XMLBrowser.pm

Modified: 7.7/trunk/server/Slim/Control/XMLBrowser.pm
URL: http://svn.slimdevices.com/slim/7.7/trunk/server/Slim/Control/XMLBrowser.pm?rev=33747&r1=33746&r2=33747&view=diff
==============================================================================
--- 7.7/trunk/server/Slim/Control/XMLBrowser.pm (original)
+++ 7.7/trunk/server/Slim/Control/XMLBrowser.pm Fri Dec  9 16:51:06 2011
@@ -1904,9 +1904,11 @@
 	# 1 => always defeat
 	# 2 => defeat if playlist length > 1
 	# 3 => defeat only if playing and current-playlist-length > 1
+	# 4 => defeat only if playing and current item not a radio stream
 	
 	return 0 if !$pref;
 	return 1 if $pref == 1 || !$client;
+	return ($client->isPlaying() && $client->playingSong()->duration()) if $pref == 4;
 	my $l = Slim::Player::Playlist::count($client);
 	return 0 if $l < 2;
 	return 0 if $pref == 3 && (!$client->isPlaying() || $l < 2);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.