Break On
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;$XMLFile - Put the path and name of the XMLTV file you want to rerun detect. ;
; ;
;$OutputFile - XML file that will be output with reruns marked by the script ;
; ;
;$DaysBeforeRerun - Put the number of days after the original airdate before a;
;show should be considered a rerun. ;
; ;
;$RerunIfNoAirDate - 1 to turn this on, marks shows with no airdate listed as ;
;reruns. O turns this off. ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
$XMLFile="C:\XMLTV\1.xml"
$OutputFile="C:\Program Files\SageTV\SageTV\1.xml"
$DaysBeforeRerun=8
$RerunIfNoAirDate=1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;No more configuration after this point;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
$Month=100 * @MONTHNO
$Day=@Mdayno
$Year=@Year*10000
$Date=$Year+$Month+$Day
Del
Open(1,$XMLFile)
Open(2,$Outputfile,5)
$Oldline=Readline(1)
;Writeline(2,$OldLine+@CRLF)
While @Error=0
IF instr($OldLine,"") OR instr($OldLine,"")
$airdatespl=Split($airdatepre[1],"<")
$airdate=$airdatespl[0]
$diff=$date-$airdate
IF $airdate<3000
$window=@year
ENDIF
ENDIF
EndIf
IF Instr($OldLine,"0 OR $diff>$DaysBeforeRerun
Writeline(2," "+@CRLF)
ENDIF
ENDIF
Writeline(2,$OldLine+@CRLF)
$Oldline=Readline(1)
Loop
Close(1)
Close(2)