-fixed liquidsoap not working when the liquidsoap global libraries were not installed

This commit is contained in:
mkonecny 2011-01-11 16:35:43 -05:00
parent 277095a538
commit 692ba3513b
23 changed files with 908 additions and 50 deletions

View file

@ -15,7 +15,7 @@ if (($file =~ /\.mp3$/i) || (test_mime($file) =~ /audio\/mpeg/)) {
if (`which mp3gain`) {
my $out = `nice -n 20 mp3gain -q "$file" 2> /dev/null` ;
my $out = `mp3gain -q "$file" 2> /dev/null` ;
$out =~ /Recommended "Track" dB change: (.*)$/m || die ;
print "$1 dB\n" ;
@ -29,7 +29,7 @@ if (($file =~ /\.mp3$/i) || (test_mime($file) =~ /audio\/mpeg/)) {
if ((`which vorbisgain`) && (`which ogginfo`)) {
system("nice -n 20 vorbisgain -q -f \"$file\" 2>/dev/null >/dev/null") ;
system("vorbisgain -q -f \"$file\" 2>/dev/null >/dev/null") ;
my $info = `ogginfo "$file"` ;
$info =~ /REPLAYGAIN_TRACK_GAIN=(.*) dB/ || die ;
print "$1 dB\n" ;
@ -52,7 +52,7 @@ if (($file =~ /\.mp3$/i) || (test_mime($file) =~ /audio\/mpeg/)) {
} else {
system("nice -n 20 metaflac --add-replay-gain \"$file\" \
system("metaflac --add-replay-gain \"$file\" \
2>/dev/null >/dev/null") ;
$info = `metaflac --show-tag=REPLAYGAIN_TRACK_GAIN "$file"` ;
$info =~ /REPLAYGAIN_TRACK_GAIN=(.*) dB/ || die "Error in $file" ;