CC-3747: Metadata popup should also show the filepath of the track
-done
This commit is contained in:
parent
3c53d5c7e6
commit
0c337fe430
2 changed files with 17 additions and 2 deletions
|
@ -45,7 +45,9 @@ class Application_Model_StoredFile {
|
||||||
"mime" => "DbMime",
|
"mime" => "DbMime",
|
||||||
"md5" => "DbMd5",
|
"md5" => "DbMd5",
|
||||||
"ftype" => "DbFtype",
|
"ftype" => "DbFtype",
|
||||||
"language" => "DbLanguage"
|
"language" => "DbLanguage",
|
||||||
|
"filepath" => "DbFilepath",
|
||||||
|
"directory" => "DbDirectory"
|
||||||
);
|
);
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
|
@ -223,7 +225,19 @@ class Application_Model_StoredFile {
|
||||||
foreach ($c['user'] as $constant => $value) {
|
foreach ($c['user'] as $constant => $value) {
|
||||||
if (preg_match('/^MDATA_KEY/', $constant)) {
|
if (preg_match('/^MDATA_KEY/', $constant)) {
|
||||||
if (isset($this->_dbMD[$value])) {
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
<div><span>Isrc Number:</span><span><?php echo ($this->md["MDATA_KEY_ISRC"]);?></span></div>
|
<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>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>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; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue