mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-11-30 12:14:36 -05:00
fix: event images saved as analysis JPEGs are found, and a missing frame keeps its id refs #6998
This commit is contained in:
1 parent
7569f166bf
commit
b493128082
2 files changed
+157
-4
No files matched your search
@@ -535,14 +535,15 @@ class Event extends ZM_Object {
|
||||
$eventPath = $Event->Path();
|
||||
|
||||
if ( $frame and !is_array($frame) ) {
|
||||
$requestedFrameId = $frame;
|
||||
Debug("Assuming that $frame is an Id");
|
||||
$f = Frame::find_one(['Id'=>$frame]);
|
||||
$f = Frame::find_one(['Id'=>$requestedFrameId]);
|
||||
if ($f) {
|
||||
$frame = (array)$f;
|
||||
} else {
|
||||
$frame = $this->find_virtual_frame($frame);
|
||||
$frame = $this->find_virtual_frame($requestedFrameId);
|
||||
if (!$frame)
|
||||
$frame = array('FrameId'=>$frame, 'Type'=>'', 'Delta'=>0);
|
||||
$frame = array('FrameId'=>$requestedFrameId, 'Type'=>'', 'Delta'=>0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -552,7 +553,7 @@ class Event extends ZM_Object {
|
||||
Debug('Frame not specified, using snapshot');
|
||||
$frame = array('FrameId'=>'snapshot', 'Type'=>'', 'Delta'=>0);
|
||||
} else {
|
||||
$captureImage = sprintf('%0'.ZM_EVENT_IMAGE_DIGITS.'d-analyze.jpg', $frame['FrameId']);
|
||||
$captureImage = sprintf('%0'.ZM_EVENT_IMAGE_DIGITS.'d-analyse.jpg', $frame['FrameId']);
|
||||
if ( ! file_exists( $eventPath.'/'.$captureImage ) ) {
|
||||
$captureImage = sprintf('%0'.ZM_EVENT_IMAGE_DIGITS.'d-capture.jpg', $frame['FrameId']);
|
||||
if ( !file_exists($eventPath.'/'.$captureImage) ) {
|
||||
|
||||
Reference in new issue
Block a user