diff --git a/fhem/CHANGED b/fhem/CHANGED index ddc3d9887..f8b56286f 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: 57_Calendar: enable gzipped ical files (forum #31845) - bugfix: 70_Jabber.pm: XMPP DNS SVR record query added - bugfix: 70_PIONEERAVR: fixed "missed to call readingsBeginUpdate first" - feature: fhemweb.js rewrite based on jQuery, single-widget-implementation diff --git a/fhem/FHEM/57_Calendar.pm b/fhem/FHEM/57_Calendar.pm index be7dc638b..9b1e60654 100644 --- a/fhem/FHEM/57_Calendar.pm +++ b/fhem/FHEM/57_Calendar.pm @@ -942,6 +942,17 @@ sub Calendar_GetUpdate($$) { #main::Debug $ical->asString(); my @entries= @{$ical->{entries}}; + if($#entries<0) { + eval { require Compress::Zlib; }; + if($@) { + Log3 $hash, 1, "Calendar " . $hash->{NAME} . ": Maybe gzip data, but cannot load Compress::Zlib"; + } + else { + $ics = Compress::Zlib::memGunzip($ics); + $ical->parse(split("\n",$ics)); + @entries= @{$ical->{entries}}; + } + }; if($#entries<0) { Log3 $hash, 1, "Calendar " . $hash->{NAME} . ": Not an ical file at URL"; $hash->{STATE}= "Not an ical file at URL";