From 8bef309a86ee9d8b55eceb3bfb56629ab31d59e3 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 16 Mar 2023 08:43:01 -0400 Subject: [PATCH 1/4] Values in terms are comma separated, so split the val for Monitor selection --- web/includes/Filter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/includes/Filter.php b/web/includes/Filter.php index 6d79e2d08..b36277bdf 100644 --- a/web/includes/Filter.php +++ b/web/includes/Filter.php @@ -1034,7 +1034,7 @@ class Filter extends ZM_Object { } $html .= ''. $term['op'].''.PHP_EOL; #$html .= ''.htmlSelect("filter[Query][terms][$i][op]", $opTypes, $term['op']).''.PHP_EOL; - $html .= ''.htmlSelect("filter[Query][terms][$i][val]", $monitors, $term['val']).''.PHP_EOL; + $html .= ''.htmlSelect("filter[Query][terms][$i][val]", $monitors, split(',',$term['val'])).''.PHP_EOL; } else if ( $term['attr'] == 'MonitorName' ) { $monitor_names = ['' => translate('All')]; foreach (Monitor::find() as $m) { From 7779af74ad49a4ce82b145f1789a348ff2072173 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Sun, 19 Mar 2023 11:31:12 -0400 Subject: [PATCH 2/4] Populate missing serial field in Storage class --- scripts/ZoneMinder/lib/ZoneMinder/Storage.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/ZoneMinder/lib/ZoneMinder/Storage.pm b/scripts/ZoneMinder/lib/ZoneMinder/Storage.pm index 3bdb51e0b..833378b26 100644 --- a/scripts/ZoneMinder/lib/ZoneMinder/Storage.pm +++ b/scripts/ZoneMinder/lib/ZoneMinder/Storage.pm @@ -47,11 +47,12 @@ use ZoneMinder::Database qw(:all); use POSIX; -use vars qw/ $table $primary_key %fields $debug/; -$debug = 0; +use vars qw/ $serial $primark_key $table $primary_key %fields $debug/; +$serial = $primary_key = 'Id'; +$debug = 1; $table = 'Storage'; $primary_key = 'Id'; -%fields = map { $_ => $_ } qw( Id Name Path DoDelete ServerId Type Url DiskSpace Scheme ); +%fields = map { $_ => $_ } qw( Id Name Path DoDelete ServerId Type Url DiskSpace Scheme Enabled); sub Path { if ( @_ > 1 ) { From 766cdcde9e50f593c5c41f51d819a3d0e2389ee8 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Sun, 19 Mar 2023 11:31:44 -0400 Subject: [PATCH 3/4] Add auth_relay to cycle urls so that auth works on cycle view --- web/skins/classic/views/js/cycle.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/skins/classic/views/js/cycle.js b/web/skins/classic/views/js/cycle.js index 0f94cf164..fb825e254 100644 --- a/web/skins/classic/views/js/cycle.js +++ b/web/skins/classic/views/js/cycle.js @@ -7,7 +7,7 @@ const playBtn = $j('#playBtn'); var monitor; function nextCycleView() { - window.location.replace('?view=cycle&mid='+nextMid+'&mode='+mode, cycleRefreshTimeout); + window.location.replace('?view=cycle&mid='+nextMid+'&mode='+mode+'&'+auth_relay, cycleRefreshTimeout); } function cyclePause() { @@ -31,7 +31,7 @@ function cycleNext() { console.log('No monitorData for ' + monIdx); } - window.location.replace('?view=cycle&mid='+monitorData[monIdx].id+'&mode='+mode, cycleRefreshTimeout); + window.location.replace('?view=cycle&mid='+monitorData[monIdx].id+'&mode='+mode+'&'+auth_relay, cycleRefreshTimeout); } function cyclePrev() { @@ -43,7 +43,7 @@ function cyclePrev() { console.log('No monitorData for ' + monIdx); } - window.location.replace('?view=cycle&mid='+monitorData[monIdx].id+'&mode='+mode, cycleRefreshTimeout); + window.location.replace('?view=cycle&mid='+monitorData[monIdx].id+'&mode='+mode+'&'+auth_relay, cycleRefreshTimeout); } function initCycle() { From a45fc576c972b55f3a73339a3764d8502516bbbe Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Tue, 21 Mar 2023 08:21:01 -0400 Subject: [PATCH 4/4] Improve detection of codec playability. Basically just look for h264 --- web/skins/classic/views/event.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/skins/classic/views/event.php b/web/skins/classic/views/event.php index bcd0b4e62..5914013c6 100644 --- a/web/skins/classic/views/event.php +++ b/web/skins/classic/views/event.php @@ -112,7 +112,7 @@ if ((!$replayMode) or !$replayModes[$replayMode]) { $replayMode = 'none'; } -$video_tag = ($Event->DefaultVideo() and ($codec == 'MP4' or $codec == 'auto')); +$video_tag = ((false !== strpos($Event->DefaultVideo(), 'h264')) and ($codec == 'MP4' or $codec == 'auto')); // videojs zoomrotate only when direct recording $Zoom = 1; @@ -141,8 +141,8 @@ $filterQuery = $filter->querystring(); $connkey = generateConnKey(); xhtmlHeaders(__FILE__, translate('Event').' '.$Event->Id()); +getBodyTopHTML(); ?> -