CC-2558 : Only delete files from disk that are in stor directory and not scheduled etc.
This commit is contained in:
parent
91feeaf84d
commit
4588ebd105
3 changed files with 27 additions and 20 deletions
|
@ -133,10 +133,6 @@ class LibraryController extends Zend_Controller_Action
|
|||
$this->view->message = "file doesn't exist";
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
$data = array("filepath"=>$file->getFilePath());
|
||||
RabbitMq::SendMessageToMediaMonitor("file_delete", $data);
|
||||
|
||||
$res = $file->delete();
|
||||
|
||||
|
@ -144,6 +140,10 @@ class LibraryController extends Zend_Controller_Action
|
|||
$this->view->message = $res->getMessage();
|
||||
return;
|
||||
}
|
||||
else {
|
||||
$data = array("filepath" => $file->getFilePath(), "delete" => $res);
|
||||
RabbitMq::SendMessageToMediaMonitor("file_delete", $data);
|
||||
}
|
||||
}
|
||||
|
||||
$this->view->id = $id;
|
||||
|
@ -153,7 +153,7 @@ class LibraryController extends Zend_Controller_Action
|
|||
{
|
||||
$post = $this->getRequest()->getPost();
|
||||
$datatables = StoredFile::searchFilesForPlaylistBuilder($post);
|
||||
|
||||
|
||||
//format clip lengh to 1 decimal
|
||||
foreach($datatables["aaData"] as &$data){
|
||||
$sec = Playlist::playlistTimeToSeconds($data[5]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue