[Slim-Checkins] r8756 - in /trunk/server: Changelog6.html Plugins/DigitalInput/ Slim/Buttons/Settings.pm Slim/Player/Transporter.pm strings.txt

dsully at svn.slimdevices.com dsully at svn.slimdevices.com
Tue Aug 1 12:09:39 PDT 2006


Author: dsully
Date: Tue Aug  1 12:09:35 2006
New Revision: 8756

URL: http://svn.slimdevices.com?rev=8756&view=rev
Log:
Bug: 3837
Description: Patch from kdf to move the Digital Input setup into Settings, and only if the client is a Transporter.

Removed:
    trunk/server/Plugins/DigitalInput/
Modified:
    trunk/server/Changelog6.html
    trunk/server/Slim/Buttons/Settings.pm
    trunk/server/Slim/Player/Transporter.pm
    trunk/server/strings.txt

Modified: trunk/server/Changelog6.html
URL: http://svn.slimdevices.com/trunk/server/Changelog6.html?rev=8756&r1=8755&r2=8756&view=diff
==============================================================================
--- trunk/server/Changelog6.html (original)
+++ trunk/server/Changelog6.html Tue Aug  1 12:09:35 2006
@@ -451,6 +451,7 @@
 		<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=3831">#3831</a> - help-&gt;faq open in new window</li>
 		<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=3832">#3832</a> - Play All Songs on Player search</li>
 		<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=3833">#3833</a> - Clean install crashes with undefined value in Import.pm</li>
+		<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=3837">#3837</a> - Digital Input plugin should only appear on transporters</li>
 		<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=3842">#3842</a> - Playing a magic favorite has some problems.</li>
 		<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=3843">#3843</a> - Undefined subroutine &Slim::Networking::Async::Socket::UDP::msg</li>
 		<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=3844">#3844</a> - Synced players - problem moving track past 'now playing' ...</li>

Modified: trunk/server/Slim/Buttons/Settings.pm
URL: http://svn.slimdevices.com/trunk/server/Slim/Buttons/Settings.pm?rev=8756&r1=8755&r2=8756&view=diff
==============================================================================
--- trunk/server/Slim/Buttons/Settings.pm (original)
+++ trunk/server/Slim/Buttons/Settings.pm Tue Aug  1 12:09:35 2006
@@ -252,9 +252,51 @@
 			'stringHeader' => 1,
 			'initialValue' => 'idlesaver',
 		},
-
+		
+		'settings/DIGITAL_INPUT' => {
+			'useMode' => 'INPUT.Choice',
+			'listRef' => [
+				{
+					name => '{OFF}',
+					value => 0,
+				},
+				{
+					name => '{DIGITAL_INPUT_BALANCED_AES}',
+					value => 1,
+				},
+				{
+					name => '{DIGITAL_INPUT_BNC_SPDIF}',
+					value => 2,
+				},
+				{
+					name => '{DIGITAL_INPUT_RCA_SPDIF}',
+					value => 3,
+				},
+				{
+					name => '{DIGITAL_INPUT_OPTICAL_SPDIF}',
+					value => 4,
+				},
+			],
+			'onPlay' => \&updateDigitalInput,
+			'onAdd' => \&updateDigitalInput,
+			'onRight' => \&updateDigitalInput,
+			'header' => '{DIGITAL_INPUT}',
+			'overlayRef' => sub {
+					return [undef,Slim::Buttons::Common::checkBoxOverlay($_[0]->prefGet('digitalInput') eq $_[1]->{'value'})]
+				},
+		},
 	);
 }
+
+sub updateDigitalInput {
+	my $client = shift;
+	my $input = shift;
+
+	my $data = pack('C', $input->{'value'});
+	$client->prefSet('digitalInput', $input->{'value'});
+	$client->sendFrame('audp', \$data);
+	$client->update;
+};
 
 sub setPref {
 	my $client = shift;
@@ -409,7 +451,10 @@
 	if ($client->isa( "Slim::Player::Squeezebox2" )) {
 		push @settingsChoices, 'SETUP_TRANSITIONTYPE';
 	}
-
+	if ($client->isa( "Slim::Player::Transporter" )) {
+		push @settingsChoices, 'DIGITAL_INPUT';
+	}
+	
 	if ($client->canDoReplayGain(0)) {
 		push @settingsChoices, 'REPLAYGAIN';
 	}

Modified: trunk/server/Slim/Player/Transporter.pm
URL: http://svn.slimdevices.com/trunk/server/Slim/Player/Transporter.pm?rev=8756&r1=8755&r2=8756&view=diff
==============================================================================
--- trunk/server/Slim/Player/Transporter.pm (original)
+++ trunk/server/Slim/Player/Transporter.pm Tue Aug  1 12:09:35 2006
@@ -28,6 +28,7 @@
 
 our $defaultPrefs = {
 	'clockSource'		=> 0,
+	'digitalInput'		=> 0,
 };
 
 sub init {

Modified: trunk/server/strings.txt
URL: http://svn.slimdevices.com/trunk/server/strings.txt?rev=8756&r1=8755&r2=8756&view=diff
==============================================================================
--- trunk/server/strings.txt (original)
+++ trunk/server/strings.txt Tue Aug  1 12:09:35 2006
@@ -12277,3 +12277,18 @@
 
 CLOCKSOURCE_SPDIF_SLAVE
 	EN	S/PDIF Input
+
+DIGITAL_INPUT
+	EN	Digital Input
+
+DIGITAL_INPUT_BALANCED_AES
+	EN	Balanced AES/EBU
+	
+DIGITAL_INPUT_BNC_SPDIF
+	EN	BNC Coax S/PDIF
+	
+DIGITAL_INPUT_RCA_SPDIF
+	EN	RCA Coax S/PDIF
+	
+DIGITAL_INPUT_OPTICAL_SPDIF
+	EN	Optical S/PDIF



More information about the checkins mailing list