Add Scheme and SaveJPEGs to Event fields, and fix setting Scheme

This commit is contained in:
Isaac Connor 2018-11-09 12:14:05 -05:00
parent abada5c95c
commit 5f81e9111f
1 changed files with 4 additions and 0 deletions

View File

@ -70,6 +70,7 @@ $serial = $primary_key = 'Id';
Frames Frames
AlarmFrames AlarmFrames
DefaultVideo DefaultVideo
SaveJPEGs
TotScore TotScore
AvgScore AvgScore
MaxScore MaxScore
@ -83,6 +84,7 @@ $serial = $primary_key = 'Id';
StateId StateId
Orientation Orientation
DiskSpace DiskSpace
Scheme
); );
use POSIX; use POSIX;
@ -168,6 +170,8 @@ sub Path {
sub Scheme { sub Scheme {
my $self = shift; my $self = shift;
$$self{Scheme} = shift if @_;
if ( ! $$self{Scheme} ) { if ( ! $$self{Scheme} ) {
if ( $$self{RelativePath} ) { if ( $$self{RelativePath} ) {
if ( $$self{RelativePath} =~ /^\d+\/\d{4}\-\d{2}\-\d{2}\/\d+$/ ) { if ( $$self{RelativePath} =~ /^\d+\/\d{4}\-\d{2}\-\d{2}\/\d+$/ ) {