summaryrefslogtreecommitdiff
path: root/PLUGINS
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2006-12-03 18:00:00 +0100
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2006-12-03 18:00:00 +0100
commit287cd613a1d5d08fb56e107460473132d23e3ca0 (patch)
treee435c0a89775a14016f8f5d1043f30d06de210bf /PLUGINS
parentbc67a03157def5c4d8d0f3c7b38351f2aeb397ee (diff)
downloadvdr-patch-lnbsharing-287cd613a1d5d08fb56e107460473132d23e3ca0.tar.gz
vdr-patch-lnbsharing-287cd613a1d5d08fb56e107460473132d23e3ca0.tar.bz2
Version 1.4.4-1vdr-1.4.4-1
- Some improvements to the man pages (thanks to Ville Skyttä). - Fixed a possible segfault in cSkins::Message() (thanks to Udo Richter). - Made the getskyepg.pl script of the 'sky' plugin send a user agent message to the server, according to the rules at http://bleb.org/tv/data/listings. If your version of 'wget' doesn't support the -U option to set the user agent, use the new option -U of getskyepg.pl to have the information added to the URL as a query string. - The getskyepg.pl script now replaces "&amp;" with "&". - Fixed a possible crash in remux.c on 64-bit machines (thanks to Reinhard Nissl). - Fixed a typo in the change to the "Use small font" setup option in version 1.3.47 in the HISTORY and CONTRIBUTORS file (reported by Andreas Brugger). - Added a missing 'const' to cRecordingInfo::ChannelID() (reported by Andreas Brugger). This required the APIVERSION to be increased, so plugins will have to be recompiled. - Now calling cPluginManager::Active() only if VDR is really trying to shut down, and waiting for 5 minutes before calling it again (thanks to Jörg Wendel for reporting that cPlugin::Active() was called too often, and to Udo Richter for some hints on how to improve this). - Replaced 'unsigned long' with 'uint32_t' and 'uint64' with 'uint64_t' to avoid problems on 64-bit machines.
Diffstat (limited to 'PLUGINS')
-rw-r--r--PLUGINS/src/sky/HISTORY9
-rwxr-xr-xPLUGINS/src/sky/getskyepg.pl28
2 files changed, 33 insertions, 4 deletions
diff --git a/PLUGINS/src/sky/HISTORY b/PLUGINS/src/sky/HISTORY
index 45774f1..3233bf6 100644
--- a/PLUGINS/src/sky/HISTORY
+++ b/PLUGINS/src/sky/HISTORY
@@ -45,3 +45,12 @@ VDR Plugin 'sky' Revision History
2006-03-26: Version 0.3.5
- Fixed format string handling.
+
+2006-12-02: Version 0.3.5 (version number not increased)
+
+- Made the getskyepg.pl script send a user agent message to
+ the server, according to the rules at http://bleb.org/tv/data/listings.
+ If your version of 'wget' doesn't support the -U option to set the user agent,
+ use the new option -U of getskyepg.pl to have the information added to the URL
+ as a query string.
+- The getskyepg.pl script now replaces "&amp;" with "&".
diff --git a/PLUGINS/src/sky/getskyepg.pl b/PLUGINS/src/sky/getskyepg.pl
index 26dbc0a..6388caa 100755
--- a/PLUGINS/src/sky/getskyepg.pl
+++ b/PLUGINS/src/sky/getskyepg.pl
@@ -8,7 +8,7 @@
#
# See the README file for copyright information and how to reach the author.
#
-# $Id: getskyepg.pl 1.4 2006/01/08 10:21:32 kls Exp $
+# $Id: getskyepg.pl 1.6 2006/12/02 09:52:49 kls Exp $
use Getopt::Std;
use Time::Local;
@@ -21,18 +21,29 @@ Options: -c filename channel config file name (default: channels.conf.sky
-p port SVDRP port number (default: 2001)
-S source channel source (default: S28.2E)
-D days days to get EPG for (1..7, default: 2)
+ -U use this if your version of 'wget' doesn't support -U
};
-die $Usage if (!getopts("c:d:D:hp:S:") || $opt_h);
+die $Usage if (!getopts("c:d:D:hp:S:U") || $opt_h);
$Conf = $opt_c || "channels.conf.sky";
$Dest = $opt_d || "localhost";
$Port = $opt_p || 2001;
$Source = $opt_S || "S28.2E";
$Days = $opt_D || 2;
+$User = $opt_U;
+
+# See "Rules for using this data" on http://bleb.org/tv/data/listings.
+# In case you modify this script in a way that changes its behavior
+# towards the www.bleb.org website, please replace 'vdrbugs@cadsoft.de'
+# with your own email address! That way Andrew Flegg <andrew@bleb.org>,
+# who runs that web site, can contact you in case of problems.
+$IDENT = "VDR::getskyepg.pl, http://www.cadsoft.de/vdr - vdrbugs\@cadsoft.de";
+$GAP = 2;
$SkyWebPage = "www.bleb.org/tv/data/listings";
$WGET = "/usr/bin/wget -q -O-";
+$WGET .= " -U '$IDENT'" unless $User;
$LOGGER = "/usr/bin/logger -t SKYEPG";
$DST = -3600; # Daylight Saving Time offset
@@ -76,13 +87,21 @@ sub GetPage
my $channel = shift;
my $day = shift;
$day--;
- my $url = "$SkyWebPage/$day/$channel.xml";
+ my $url = "http://$SkyWebPage/$day/$channel.xml";
+ $url .= "?$IDENT" if $User;
Log("reading $url");
my @page = split("\n", `$WGET '$url'`);
Log("received " . ($#page + 1) . " lines");
return @page;
}
+sub ReplaceTags
+{
+ my $s = shift;
+ $s =~ s/&amp;/&/g;
+ return $s;
+}
+
sub StripWhitespace
{
my $s = shift;
@@ -96,7 +115,7 @@ sub Extract
my $s = shift;
my $t = shift;
$s =~ /<$t>([^<]*)<\/$t>/;
- return StripWhitespace($1);
+ return ReplaceTags(StripWhitespace($1));
}
# In order to get the duration we need to buffer the last event:
@@ -174,6 +193,7 @@ sub GetEpgData
$data .= $line;
}
}
+ sleep($GAP);
}
SVDRPsend("c");
Log("generated $numEvents EPG events");