SAAS-542: ryerson.airtime.pro file doesn't play, preview, or download
This commit is contained in:
parent
527d2851af
commit
38882abd1a
|
@ -65,27 +65,11 @@ class CloudFile extends BaseCloudFile
|
||||||
*/
|
*/
|
||||||
public function isValidPhysicalFile()
|
public function isValidPhysicalFile()
|
||||||
{
|
{
|
||||||
$ch = curl_init($this->getURLForTrackPreviewOrDownload());
|
// We don't need to check if the cloud file is a valid file because
|
||||||
|
// before it is imported the Analyzer runs it through Liquidsoap
|
||||||
// There is not enough memory to download large files so instead
|
// to check its playability. If Liquidsoap can't play the file it
|
||||||
// write the file contents to /dev/null
|
// does not get imported into the Airtime library.
|
||||||
$fp = fopen('/dev/null', 'w+');
|
return true;
|
||||||
|
|
||||||
curl_setopt_array($ch, array(
|
|
||||||
CURLOPT_FILE, $fp,
|
|
||||||
CURLOPT_RETURNTRANSFER => true,
|
|
||||||
CURLOPT_SSL_VERIFYPEER => false,
|
|
||||||
CURLOPT_VERBOSE => false
|
|
||||||
));
|
|
||||||
curl_exec($ch);
|
|
||||||
$http_status = curl_getinfo($ch);
|
|
||||||
|
|
||||||
if ($http_status["http_code"] === 200)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue