mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 16:56:54 +00:00
74_UnifiVideo.pm: fixed regex for cam matching
git-svn-id: https://svn.fhem.de/fhem/trunk@23848 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
f801260dbf
commit
bd6daee005
@ -155,7 +155,7 @@ UnifiVideo_2html($;$$)
|
||||
next if( $entry->{state} eq 'DISCONNECTED' );
|
||||
if( defined($cams) ) {
|
||||
foreach my $cam (@cams) {
|
||||
if( ( $cam =~ m/[0-9]+/ && int($cam) == $i )
|
||||
if( ( $cam =~ m/^[0-9]+$/ && int($cam) == $i )
|
||||
|| $entry->{_id} eq $cam
|
||||
|| $entry->{name} =~ m/$cam/ ) {
|
||||
$html .= "\n" if( $html );
|
||||
@ -202,7 +202,7 @@ UnifiVideo_Set($$@)
|
||||
foreach my $entry (@{$json->{data}}) {
|
||||
next if( $entry->{deleted} );
|
||||
next if( $entry->{state} eq 'DISCONNECTED' );
|
||||
if( ( $cam =~ m/[0-9]+/ && int($cam) == $i )
|
||||
if( ( $cam =~ m/^[0-9]+$/ && int($cam) == $i )
|
||||
|| $entry->{_id} eq $cam
|
||||
|| $entry->{name} =~ m/$cam/ ) {
|
||||
$cam = $entry->{_id};
|
||||
|
Loading…
x
Reference in New Issue
Block a user