zmu may still output results even if it encounters errors, so continue even if we have an error return status from zmu.

This commit is contained in:
Isaac Connor 2021-08-05 14:48:06 -04:00
parent c280279cf7
commit 50326cf80c
1 changed files with 6 additions and 8 deletions

View File

@ -18,7 +18,7 @@
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//
if ( !canEdit('Monitors') ) {
if (!canEdit('Monitors')) {
$view = 'error';
return;
}
@ -31,11 +31,9 @@ function probeV4L() {
$command = getZmuCommand(' --query --device');
if ( !empty($_REQUEST['device']) )
$command .= '='.escapeshellarg($_REQUEST['device']);
$result = exec(escapeshellcmd($command), $output, $status);
if ( $status ) {
ZM\Error("Unable to probe local cameras using $command, status is '$status' " . implode("\n",$output));
return $cameras;
if ($status) {
ZM\Warning("Errors while probe local cameras using $command, status is '$status' " . implode("\n", $output));
}
$monitors = array();
@ -325,15 +323,15 @@ xhtmlHeaders(__FILE__, translate('MonitorProbe') );
<div id="page">
<h2><?php echo translate('MonitorProbe') ?></h2>
<div id="content">
<form name="contentForm" id="contentForm" method="post" action="?">
<form name="contentForm" id="contentForm" method="get" action="?">
<input type="hidden" name="view" value="none"/>
<input type="hidden" name="mid" value="<?php echo validNum($_REQUEST['mid']) ?>"/>
<input type="hidden" name="mid" value="<?php echo isset($_REQUEST['mid'])?validNum($_REQUEST['mid']):'' ?>"/>
<p>
<?php echo translate('MonitorProbeIntro') ?>
</p>
<p>
<label for="probe"><?php echo translate('DetectedCameras') ?></label>
<?php echo htmlSelect('probe', $cameras, null, array('data-on-change-this'=>'configureButtons(this)')); ?>
<?php echo htmlSelect('probe', $cameras, null, array('data-on-change-this'=>'configureButtons')); ?>
</p>
<div id="contentButtons">
<button type="button" name="saveBtn" value="Save" data-on-click-this="submitCamera" disabled="disabled">