diff --git a/Slim/Player/TranscodingHelper.pm b/Slim/Player/TranscodingHelper.pm index 837f040e117..916630aa20d 100644 --- a/Slim/Player/TranscodingHelper.pm +++ b/Slim/Player/TranscodingHelper.pm @@ -87,7 +87,7 @@ sub loadConversionTables { $line =~ s/\s*$//o; if ($line =~ /^proxy\s+(\S+)\s+(\S+)/i) { - $proxies{$1} = $2; + push @{$proxies{$1}}, $2; } elsif ($line =~ /^(\S+)\s+(\S+)\s+(\S+)\s+(\S+)$/) { @@ -365,11 +365,11 @@ sub getConvertCommand2 { } if ($prefs->get('prioritizeNative')) { - my $proxy = $proxies{$type} || $type; - my @types = $proxy eq 'wav' ? ('pcm', $proxy) : ($proxy); + my @types = $proxies{$type} ? @{$proxies{$type}} : ($type); + unshift @types, 'pcm' if grep /wav/, @types; foreach my $type (@types) { my ($format) = grep /$type/, @supportedformats; - @supportedformats = ($format, grep { $_ !~ $proxy } @supportedformats) if $format; + @supportedformats = ($format, grep { $_ !~ $type } @supportedformats) if $format; } } diff --git a/convert.conf b/convert.conf index 21bc42d9089..0e12680a124 100644 --- a/convert.conf +++ b/convert.conf @@ -88,13 +88,13 @@ # ${FILENAME}$ - contents of {FILENAME} (may contain other $*$ substitutions ) # # It's also possible to define "proxies" who tell rules matcher what format a helper -# spits out. This is useful to use player's native format whenever possible. +# spits out. This is useful to stick to player's native format whenever possible. Use +# multiple lines if an helper can output different formats (increasing priority) # proxy # For example if a plugin has created a new format named 'spt' whose helper's output # is always 'ogg', you would use # proxy spt ogg - # specific combinations match before wildcards mp4 mp3 * *