Merge saas-dev into soundcloud

This commit is contained in:
Duncan Sommerville 2015-06-10 16:08:52 -04:00
commit 459f9494c3
373 changed files with 6577 additions and 10376 deletions

View file

@ -1027,14 +1027,16 @@ SQL;
$LIQUIDSOAP_ERRORS = array('TagLib: MPEG::Properties::read() -- Could not find a valid last MPEG frame in the stream.');
// Ask Liquidsoap if file is playable
$ls_command = sprintf('/usr/bin/airtime-liquidsoap -v -c "output.dummy(audio_to_stereo(single(%s)))" 2>&1',
/* CC-5990/5991 - Changed to point directly to liquidsoap, removed PATH export */
$command = sprintf('liquidsoap -v -c "output.dummy(audio_to_stereo(single(%s)))" 2>&1',
escapeshellarg($audio_file));
$command = "export PATH=/usr/local/bin:/usr/bin:/bin/usr/bin/ && $ls_command";
exec($command, $output, $rv);
$isError = count($output) > 0 && in_array($output[0], $LIQUIDSOAP_ERRORS);
Logging::info("Is error?! : " . $isError);
Logging::info("ls playability response: " . $rv);
return ($rv == 0 && !$isError);
}