CC-1799 Put Airtime Storage into a Human Readable File Naming Convention
about to merge, need to test more with blank metadata/change paths according to spec. Should test case about moving to trash from UI.
This commit is contained in:
parent
ff61972e82
commit
c06b15b964
5 changed files with 83 additions and 65 deletions
|
@ -104,6 +104,10 @@ class StoredFile {
|
|||
}
|
||||
else {
|
||||
foreach ($p_md as $dbColumn => $mdValue) {
|
||||
//don't blank out name, defaults to original filename on first insertion to database.
|
||||
if($p_category == "track_title" && (is_null($p_value) || $p_value == "")) {
|
||||
continue;
|
||||
}
|
||||
$propelColumn = $this->_dbMD[$dbColumn];
|
||||
$method = "set$propelColumn";
|
||||
$this->_file->$method($mdValue);
|
||||
|
@ -136,6 +140,10 @@ class StoredFile {
|
|||
*/
|
||||
public function setDbColMetadataValue($p_category, $p_value)
|
||||
{
|
||||
//don't blank out name, defaults to original filename on first insertion to database.
|
||||
if($p_category == "track_title" && (is_null($p_value) || $p_value == "")) {
|
||||
return;
|
||||
}
|
||||
$propelColumn = $this->_dbMD[$p_category];
|
||||
$method = "set$propelColumn";
|
||||
$this->_file->$method($p_value);
|
||||
|
@ -736,6 +744,7 @@ class StoredFile {
|
|||
$md['MDATA_KEY_TITLE'] = $fileName;
|
||||
|
||||
StoredFile::Insert($md);
|
||||
$r = @chmod($audio_file, 0666);
|
||||
$r = @rename($audio_file, $audio_stor);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue