From: Karl D. <de...@us...> - 2010-09-11 09:20:02
|
Update of /cvsroot/xmltv/xmltv/grab/in In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv23860/grab/in Modified Files: tv_grab_in Log Message: make _in obey --days and --offset to silence notadditive (splitting days at midnight IST to match data source) Index: tv_grab_in =================================================================== RCS file: /cvsroot/xmltv/xmltv/grab/in/tv_grab_in,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** tv_grab_in 10 Sep 2010 13:41:59 -0000 1.9 --- tv_grab_in 11 Sep 2010 09:19:53 -0000 1.10 *************** *** 488,491 **** --- 488,506 ---- # + # set up start and stop filter (aka earliest start time and latest start time) + # + my $start_of_today=time(); + # last midnight + $start_of_today -= $start_of_today%(24*60*60); + # FIXME adjust for TZ, messed up the conversion betweent UTC and localtime somewhere + $start_of_today -= (5*60+30)*60; + # add 06:00 (random time to split between today and tomorrow) FIXME only last midnight +48h in the source data, splitting at midnight + #$start_of_today += (6*60+0)*60; + my $start=$start_of_today+($opt_offset)*(24*60*60); + $start=UnixDate(ParseDateString("epoch $start"), "%Y%m%d%H%M%S"); + my $stop=$start_of_today+($opt_offset+$opt_days)*(24*60*60)-1; + $stop=UnixDate(ParseDateString("epoch $stop"), "%Y%m%d%H%M%S"); + + # # ok, let's walk through the data # *************** *** 506,511 **** $skip=0; $skip=1 if $opt_list_channels; ! # $skip=1 if $1 lt $start; ! # $skip=1 if $1 gt $stop; $skip=1 unless $chan_config{$2}; $sched_count++ unless $skip; --- 521,526 ---- $skip=0; $skip=1 if $opt_list_channels; ! $skip=1 if $1 lt $start; ! $skip=1 if $1 gt $stop; $skip=1 unless $chan_config{$2}; $sched_count++ unless $skip; |