diff --git a/Slim/Player/TranscodingHelper.pm b/Slim/Player/TranscodingHelper.pm index 916630aa20d..e760bd39529 100644 --- a/Slim/Player/TranscodingHelper.pm +++ b/Slim/Player/TranscodingHelper.pm @@ -86,8 +86,8 @@ sub loadConversionTables { $line =~ s/^\s*//o; $line =~ s/\s*$//o; - if ($line =~ /^proxy\s+(\S+)\s+(\S+)/i) { - push @{$proxies{$1}}, $2; + if ($line =~ /^proxy\s+(\S+)\s+(\S+)/i) { + $proxies{$1} = $2; } elsif ($line =~ /^(\S+)\s+(\S+)\s+(\S+)\s+(\S+)$/) { @@ -365,7 +365,7 @@ sub getConvertCommand2 { } if ($prefs->get('prioritizeNative')) { - my @types = $proxies{$type} ? @{$proxies{$type}} : ($type); + my @types = split /,/, ($proxies{$type} || $type); unshift @types, 'pcm' if grep /wav/, @types; foreach my $type (@types) { my ($format) = grep /$type/, @supportedformats; diff --git a/convert.conf b/convert.conf index 0e12680a124..ea072e7a824 100644 --- a/convert.conf +++ b/convert.conf @@ -87,13 +87,14 @@ # %Q, - quality ( fractal notation: if = '0' return '01' ) # ${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 stick to player's native format whenever possible. Use -# multiple lines if an helper can output different formats (increasing priority) -# proxy +# It's also possible to define "proxies" who tell rules matcher what format(s) a +# helper spits out. This is useful to stick to player's native format whenever +# possible. Use comma-separated list for multiple output formats, from least +# favorite to most favorite +# 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 +# is 'ogg' or 'pcm', and you want 'ogg' to be most desired, then add +# proxy spt pcm,ogg # specific combinations match before wildcards