cc-2419: media monitor import on startup
-fixed support for watched dirs
This commit is contained in:
parent
c67e711a05
commit
df1dec2078
7 changed files with 38 additions and 22 deletions
|
@ -521,8 +521,9 @@ class ApiController extends Zend_Controller_Action
|
|||
print 'You are not allowed to access this resource.';
|
||||
exit;
|
||||
}
|
||||
$dir_id = $request->getParam('dir_id');
|
||||
|
||||
$this->view->files = StoredFile::listAllFiles();
|
||||
$this->view->files = StoredFile::listAllFiles($dir_id);
|
||||
}
|
||||
|
||||
public function listAllWatchedDirsAction() {
|
||||
|
@ -542,10 +543,10 @@ class ApiController extends Zend_Controller_Action
|
|||
$arrWatchedDirs = MusicDir::getWatchedDirs();
|
||||
$storDir = MusicDir::getStorDir();
|
||||
|
||||
$result[] = $storDir->getDirectory();
|
||||
$result[$storDir->getId()] = $storDir->getDirectory();
|
||||
|
||||
foreach ($arrWatchedDirs as $watchedDir){
|
||||
$result[] = $watchedDir->getDirectory();
|
||||
$result[$watchedDir->getId()] = $watchedDir->getDirectory();
|
||||
}
|
||||
|
||||
$this->view->dirs = $result;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue