instantiate a false Frame object with id = objectect

This commit is contained in:
Isaac Connor 2019-02-11 16:37:22 -05:00
parent ed6b22ac06
commit 5ce681b463
1 changed files with 3 additions and 1 deletions

View File

@ -79,10 +79,12 @@ if ( empty($_REQUEST['path']) ) {
if ( $_REQUEST['fid'] == 'objdetect' ) {
$path = $Event->Path().'/objdetect.jpg';
if ( !file_exists($path)) {
if ( !file_exists($path) ) {
header('HTTP/1.0 404 Not Found');
Fatal("File $path does not exist. Please make sure store_frame_in_zm is enabled in the object detection config");
}
$Frame = new Frame();
$Frame->Id('objdetect');
} else if ( $_REQUEST['fid'] == 'alarm' ) {
# look for first alarmed frame
$Frame = Frame::find_one(array('EventId'=>$_REQUEST['eid'], 'Type'=>'Alarm'),