Index: Slim/Player/Source.pm =================================================================== RCS file: /home/cvs/cvsroot/slim/server/Slim/Player/Source.pm,v retrieving revision 1.96 diff -u -p -B -r1.96 Source.pm --- Slim/Player/Source.pm 28 May 2004 12:47:03 -0000 1.96 +++ Slim/Player/Source.pm 7 Jun 2004 20:37:56 -0000 @@ -1,6 +1,6 @@ package Slim::Player::Source; -# $Id: Source.pm,v 1.96 2004/05/28 12:47:03 kdf Exp $ +# $Id: Source.pm,v 1.95 2004/05/27 07:10:23 kdf Exp $ # SlimServer Copyright (C) 2001-2004 Sean Adams, Slim Devices Inc. # This program is free software; you can redistribute it and/or @@ -103,10 +103,11 @@ sub loadConversionTables { next unless defined $command && $command !~ /^\s*$/; $commandTable{"$inputtype-$outputtype-$clienttype-$clientid"} = $command; - checkBin("$inputtype-$outputtype-$clienttype-$clientid"); } } - + foreach my $profile (keys %commandTable) { + checkBin("$profile"); + } close CONVERT; } } @@ -1057,7 +1058,11 @@ sub underMax { my $maxRate = Slim::Utils::Prefs::setMaxRate($client); return 1 if $maxRate == 0; - return undef if !Slim::Utils::Misc::findbin('lame'); + my @formats = $client->formats(); + if (!Slim::Utils::Misc::findbin('lame')) { + return 1 unless $formats[0] eq 'mp3'; + return undef; + }; my $rate = (Slim::Music::Info::bitratenum($fullpath) || 0)/1000; return ($maxRate >= $rate); } @@ -1130,7 +1135,7 @@ sub getConvertCommand { # only finish if the rate isn't over the limit, or the file is # set to transcode to mp3 (which gets set to maxRate) - last if ($command && ($undermax || ($format eq "mp3"))); + last if ($command && ((defined $undermax && $undermax) || ($format eq "mp3"))); } if (!defined $command) {