From 8e616636526b9d7f7530d96dcb69efa1d9e011d2 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 22 Feb 2004 13:33:20 +0100 Subject: Implemented handling the VPS timestamps --- epg2html.pl | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'epg2html.pl') diff --git a/epg2html.pl b/epg2html.pl index 6b7b8c94..c6e6f9cf 100755 --- a/epg2html.pl +++ b/epg2html.pl @@ -12,7 +12,7 @@ # See the main source file 'vdr.c' for copyright information and # how to reach the author. # -# $Id: epg2html.pl 1.4 2002/05/30 09:46:46 kls Exp $ +# $Id: epg2html.pl 1.5 2004/02/22 13:18:27 kls Exp $ @Index = (); @@ -47,13 +47,14 @@ while (<>) { while (<>) { if (/^E (.*?) (.*?) ([^ ]*)/) { (my $Time, $Duration) = ($2, $3); - my $Title = "", $Subtitle = "", $Description = ""; + my $Title = "", $Subtitle = "", $Description = "", $Vps = 0; while (<>) { if (/^T (.*)/) { $Title = Tags($1); } elsif (/^S (.*)/) { $Subtitle = Tags($1); } elsif (/^D (.*)/) { $Description = Tags($1); } + elsif (/^V (.*)/) { $Vps = $1; } elsif (/^e/) { - $Events{$Time} = [($Duration, $Title, $Subtitle, $Description)]; + $Events{$Time} = [($Duration, $Title, $Subtitle, $Description, $Vps)]; last; } } @@ -62,7 +63,7 @@ while (<>) { my @Schedule = (); my $Day = ""; for $t (sort keys %Events) { - (my $Duration, $Title, $Subtitle, $Description) = @{$Events{$t}}; + (my $Duration, $Title, $Subtitle, $Description, $Vps) = @{$Events{$t}}; my $d = GetDay($t); if ($d ne $Day) { push(@Schedule, "\n") if ($Day && @Schedule); @@ -73,6 +74,7 @@ while (<>) { my $Entry = $Title; $Entry .= "
$Subtitle" if $Subtitle; $Entry .= "
$Description" if $Description; + $Entry .= "
(VPS = " . scalar localtime($Vps) . ")" if $Vps && $Vps != $t; push(@Schedule, "" . GetTime($t) . "$Entry\n"); } push(@Schedule, "\n") if (@Schedule); -- cgit v1.2.3