From fdf99ad506b156a794237690502cdb701ab118be Mon Sep 17 00:00:00 2001 From: borisneubert Date: Sat, 19 Dec 2020 12:24:26 +0000 Subject: [PATCH] 02_RSS: added readings to show filename and type of background git-svn-id: https://svn.fhem.de/fhem/trunk@23383 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 1 + fhem/FHEM/02_RSS.pm | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index 56d641963..ae2fdad3d 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,6 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - feature: 02_RSS: added readings to show filename and type of background - bugfix: 57_SSCal: accept calendar names which are contain umlauts - feature: 98_weekprofile: add support for MQTT2_DEVICE (txl Beta-User) - feature: 89_FULLY: Added support for sensor information diff --git a/fhem/FHEM/02_RSS.pm b/fhem/FHEM/02_RSS.pm index 3ed9527c9..2fabed285 100644 --- a/fhem/FHEM/02_RSS.pm +++ b/fhem/FHEM/02_RSS.pm @@ -972,6 +972,8 @@ sub RSS_returnIMG($$) { $defs{$name}{fhem}{bgnr} = $bgnr; my $bgfile = $bgdir . "/" . $bgfiles[$bgnr]; my $filetype = ( split( /\./, $bgfile ) )[-1]; + readingsSingleUpdate($defs{$name}, "bgFilename", $bgfile, 1); + readingsSingleUpdate($defs{$name}, "bgFiletype", $filetype, 1); my $bg; $bg = newFromGif GD::Image($bgfile) if $filetype =~ m/^gif$/i; @@ -1012,8 +1014,7 @@ sub RSS_returnIMG($$) { } else { undef $S; - $reason = -"Something was wrong with background image \"$bgfile\"."; + $reason = "Something was wrong with background image \"$bgfile\"."; } } }