feat: move storage path setting to configuration file
- change default storage path to /srv/libretime - remove music dirs table - use /tmp for testing storage - storage dir should always have a trailing slash
This commit is contained in:
parent
b3ff2defc4
commit
f7bb6e7592
48 changed files with 464 additions and 4701 deletions
|
@ -417,11 +417,11 @@ class LibraryController extends Zend_Controller_Action
|
|||
$file = Application_Model_StoredFile::RecallById($id);
|
||||
$this->view->type = $type;
|
||||
$md = $file->getMetadata();
|
||||
$storagePath = Config::getStoragePath();
|
||||
|
||||
foreach ($md as $key => $value) {
|
||||
if ($key == 'MDATA_KEY_DIRECTORY' && !is_null($value)) {
|
||||
$musicDir = Application_Model_MusicDir::getDirByPK($value);
|
||||
$md['MDATA_KEY_FILEPATH'] = Application_Common_OsPath::join($musicDir->getDirectory(), $md['MDATA_KEY_FILEPATH']);
|
||||
$md['MDATA_KEY_FILEPATH'] = Application_Common_OsPath::join($storagePath, $md['MDATA_KEY_FILEPATH']);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue