CC-1799 Put Airtime Storage into a Human Readable File Naming Convention

changing ftype calculation to the python script.
This commit is contained in:
Naomi Aro 2011-06-14 18:52:43 +02:00
parent af4ec7b872
commit ff61972e82
3 changed files with 9 additions and 11 deletions

View file

@ -40,7 +40,8 @@ class StoredFile {
"sample_rate" => "DbSampleRate",
"mime" => "DbMime",
"filepath" => "DbFilepath",
"md5" => "DbMd5"
"md5" => "DbMd5",
"ftype" => "DbFtype"
);
public function __construct()
@ -390,15 +391,6 @@ class StoredFile {
$storedFile->_file = $file;
if(isset($md)) {
if(isset($md['MDATA_KEY_MIME'])) {
if (preg_match("/mp3/i", $md['MDATA_KEY_MIME'])) {
$file->setDbFtype("audioclip");
}
else if (preg_match("/vorbis/i", $md['MDATA_KEY_MIME'])) {
$file->setDbFtype("audioclip");
}
}
$storedFile->setMetadata($md);
}