mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 12:49:34 +00:00
bugfix for background selection in 02_RSS.pm
git-svn-id: https://svn.fhem.de/fhem/trunk@1406 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
92fb192e05
commit
cd6d0f0c7a
@ -321,10 +321,16 @@ RSS_returnJPEG($) {
|
||||
#
|
||||
# set the background
|
||||
#
|
||||
my $bgdir= AttrVal($name,"bg","");
|
||||
my $bgnr= 0; # item number
|
||||
# check if background directory is set
|
||||
my $bgdir= AttrVal($name,"bg","");
|
||||
goto SKIPBG unless($bgdir ne "");
|
||||
|
||||
my $bgnr; # item number
|
||||
if(defined($defs{$name}{fhem}) && defined($defs{$name}{fhem}{bgnr})) {
|
||||
$bgnr= $defs{$name}{fhem}{bgnr};
|
||||
} else {
|
||||
$bgnr= 0;
|
||||
}
|
||||
# check if at least tmin seconds have passed
|
||||
my $t0= 0;
|
||||
my $tmin= AttrVal($name,"tmin",0);
|
||||
@ -334,9 +340,7 @@ RSS_returnJPEG($) {
|
||||
my $t1= time();
|
||||
if($t1-$t0>= $tmin) {
|
||||
$defs{$name}{fhem}{t}= $t1;
|
||||
if(defined($defs{$name}{fhem}) && defined($defs{$name}{fhem}{bgnr})) {
|
||||
$bgnr= $defs{$name}{fhem}{bgnr}+1;
|
||||
}
|
||||
$bgnr++;
|
||||
}
|
||||
# detect pictures
|
||||
goto SKIPBG unless(opendir(BGDIR, $bgdir));
|
||||
|
Loading…
Reference in New Issue
Block a user