Merge pull request #974 from SteveGilvarry/h264_jpeg_mode

Fix to display thumbnails when only storing snapshot.jpg
This commit is contained in:
Andrew Bauer 2015-07-28 08:55:52 -05:00
commit bb0c016d3d
1 changed files with 5 additions and 1 deletions

View File

@ -1126,7 +1126,11 @@ function getImageSrc( $event, $frame, $scale=SCALE_BASE, $captureOnly=false, $ov
$frame = array( 'FrameId'=>$frame, 'Type'=>'' ); $frame = array( 'FrameId'=>$frame, 'Type'=>'' );
//echo "S:$scale, CO:$captureOnly<br>"; //echo "S:$scale, CO:$captureOnly<br>";
$captImage = sprintf( "%0".ZM_EVENT_IMAGE_DIGITS."d-capture.jpg", $frame['FrameId'] ); $currEvent = dbFetchOne( 'SELECT M.SaveJPEGs FROM Events AS E INNER JOIN Monitors AS M ON E.MonitorId = M.Id WHERE E.Id = '.$event['Id'] );
if ( $currEvent['SaveJPEGs'] == "4" )
$captImage = "snapshot.jpg";
else
$captImage = sprintf( "%0".ZM_EVENT_IMAGE_DIGITS."d-capture.jpg", $frame['FrameId'] );
$captPath = $eventPath.'/'.$captImage; $captPath = $eventPath.'/'.$captImage;
$thumbCaptPath = ZM_DIR_IMAGES.'/'.$event['Id'].'-'.$captImage; $thumbCaptPath = ZM_DIR_IMAGES.'/'.$event['Id'].'-'.$captImage;
//echo "CI:$captImage, CP:$captPath, TCP:$thumbCaptPath<br>"; //echo "CI:$captImage, CP:$captPath, TCP:$thumbCaptPath<br>";