CC-3561: Add button to automatically rescan watched folders.
-done
This commit is contained in:
parent
70bfe031ef
commit
d02607ed94
6 changed files with 32 additions and 11 deletions
|
@ -353,10 +353,12 @@ class PreferenceController extends Zend_Controller_Action
|
|||
|
||||
public function rescanWatchDirectoryAction()
|
||||
{
|
||||
$dirs = Application_Model_MusicDir::getWatchedDirs();
|
||||
foreach ($dirs as $dir) {
|
||||
$res = Application_Model_MusicDir::addWatchedDir($dir->getDirectory());
|
||||
}
|
||||
$dir = Application_Model_MusicDir::getDirByPath($this->getRequest()->getParam("dir"));
|
||||
$id = $dir->getId();
|
||||
$data = array();
|
||||
$data['directory'] = $dir->getDirectory();
|
||||
$data['id'] = $id;
|
||||
Application_Model_RabbitMq::SendMessageToMediaMonitor('rescan_watch', $data);
|
||||
die();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue