diff -ur Slim1/Player/Client.pm Slim/Player/Client.pm --- Slim1/Player/Client.pm 2004-01-07 18:14:33.000000000 +0000 +++ Slim/Player/Client.pm 2004-01-11 14:08:26.000000000 +0000 @@ -260,6 +260,7 @@ $client->[83] = undef; # settingsSelection $client->[84] = undef; # songBytes $client->[85] = undef; # pauseTime + $client->[86] = undef; # streamendformat $::d_protocol && msg("New client connected: $id\n"); $client->lastirtime(0); @@ -837,4 +838,10 @@ @_ ? ($r->[85] = shift) : $r->[85]; } +sub streamendformat { + my $r = shift; + @_ ? ($r->[86] = shift) : $r->[86]; +} + + 1; diff -ur Slim1/Player/Source.pm Slim/Player/Source.pm --- Slim1/Player/Source.pm 2004-01-11 11:48:07.000000000 +0000 +++ Slim/Player/Source.pm 2004-01-11 14:52:13.000000000 +0000 @@ -819,13 +819,20 @@ my $client = shift; my $fullpath = shift; + my @targformat; + + if ($client->streamendformat && $client->streamendformat ne "") { @targformat = ($client->streamendformat); } + else { @targformat=$client->formats(); } + my $type = Slim::Music::Info::contentType($fullpath); my $player = $client->model(); my $clientid = $client->id(); my $command = undef; my $format = undef; + + if ( $::d_source ) { foreach my $check1 (@targformat) { msg("Added Target $check1 format for: $clientid\n"); } } - foreach my $checkformat ($client->formats()) { + foreach my $checkformat (@targformat) { $::d_source && msg("checking formats for: $type-$checkformat-$player-$clientid\n"); # TODO: match partial wildcards in IP addresses. # todo: pre-check to see if the necessary binaries are installed. diff -ur Slim1/Player/Squeezebox.pm Slim/Player/Squeezebox.pm --- Slim1/Player/Squeezebox.pm 2004-01-07 18:14:33.000000000 +0000 +++ Slim/Player/Squeezebox.pm 2004-01-11 14:56:57.000000000 +0000 @@ -304,7 +304,7 @@ assert(length($frame) == 4+16); - my $path = '/stream.mp3?player='.$client->id; + my $path = '/stream?player='.$client->id; my $request_string = "GET $path HTTP/1.0\n"; diff -ur Slim1/Web/HTTP.pm Slim/Web/HTTP.pm --- Slim1/Web/HTTP.pm 2004-01-11 11:47:21.000000000 +0000 +++ Slim/Web/HTTP.pm 2004-01-11 14:16:22.000000000 +0000 @@ -375,7 +375,7 @@ } # is this an HTTP stream? - if (!defined($client) && ($path =~ /(?:stream\.mp3|stream)$/)) { + if (!defined($client) && ($path =~ /(?:stream\.\w*|stream)$/)) { my $address = $peeraddr{$httpclientsock}; @@ -1033,7 +1033,11 @@ my $coderef = $pageFunctions{$path}; if (ref($coderef) eq 'CODE') { $body = &$coderef($client, $paramsref, \&generateResponse_Done, $httpclientsock, \$result, \%headers, \%paramheaders); - } elsif ($path =~ /(?:stream\.mp3|stream)$/) { + } elsif ($path =~ /(stream\.(\w*)|stream)$/) { + my $format=$2; + if (!defined($format) || $format eq "") { $format=undef; } + $client->streamendformat($format); + $::d_http && msg("Setting streamendformat to $format\n"); %headers = statusHeaders($client); $headers{"x-audiocast-name"} = string('SLIMSERVER'); if ($sendMetaData{$httpclientsock}) {