CC-3747: Metadata popup should also show the filepath of the track

-done
This commit is contained in:
denise 2012-05-01 12:39:56 -04:00
parent 3c53d5c7e6
commit 0c337fe430
2 changed files with 17 additions and 2 deletions

View File

@ -45,7 +45,9 @@ class Application_Model_StoredFile {
"mime" => "DbMime",
"md5" => "DbMd5",
"ftype" => "DbFtype",
"language" => "DbLanguage"
"language" => "DbLanguage",
"filepath" => "DbFilepath",
"directory" => "DbDirectory"
);
public function __construct()
@ -223,7 +225,19 @@ class Application_Model_StoredFile {
foreach ($c['user'] as $constant => $value) {
if (preg_match('/^MDATA_KEY/', $constant)) {
if (isset($this->_dbMD[$value])) {
$md[$constant] = $this->getDbColMetadataValue($value);
if ($value == 'filepath') {
$directoryPK = $this->getDbColMetadataValue('directory');
if ($directoryPK == 1) {
$musicDir = Application_Model_MusicDir::getDirByPK($directoryPK);
$md[$constant] = $musicDir->getDirectory() . $this->getDbColMetadataValue($value);
}
else {
$md[$constant] = $this->getDbColMetadataValue($value);
}
}
else {
$md[$constant] = $this->getDbColMetadataValue($value);
}
}
}
}

View File

@ -17,6 +17,7 @@
<div><span>Isrc Number:</span><span><?php echo ($this->md["MDATA_KEY_ISRC"]);?></span></div>
<div><span>Website:</span><span><?php echo ($this->md["MDATA_KEY_URL"]);?></span></div>
<div><span>Language:</span><span><?php echo ($this->md["MDATA_KEY_LANGUAGE"]);?></span></div>
<div><span>File Path:</span><span><?php echo ($this->md["MDATA_KEY_FILEPATH"]);?></span></div>
<?php endif; ?>