;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;Enter the XMLTV file for which you would like to have the channel numbers ; ;prepended with 1-9. To activate the line you have to remove the semi-colon (;); ;in front of the line you want to activate (See Example Below) ; ; Example: $RenumberPrepend2="c:\xmltv\Example.xml" ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;$RenumberPrepend1=;"c:\xmltv\1.xml" ;$RenumberPrepend2="c:\xmltv\Example.xml" ;$RenumberPrepend3=;"c:\xmltv\3.xml" ;$RenumberPrepend4=;"c:\xmltv\4.xml" ;$RenumberPrepend5=;"c:\xmltv\5.xml" ;$RenumberPrepend6=;"c:\xmltv\6.xml" ;$RenumberPrepend7=;"c:\xmltv\7.xml" ;$RenumberPrepend8=;"c:\xmltv\8.xml" ;$RenumberPrepend9=;"c:\xmltv\9.xml" ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; $XMLTVFiles - Enter the full path to the files you want to extract ; ; channel data from in quotes. If more than one source separate by commas. ; ; E.G. $XMLTVFiles="c:\xmltv\1.xml","c:\xmltv\2.xml" ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;Once you choose which XML files you want to renumber, add the variable name ; ;to the end of the following line line separated by commas. E.G, ; ;Example: $XMLTVFiles="c:\xmltv\1.xml","C:\Program Files\SageTV\SageTV\2.xml",$RenumberPrepend2,$RenumberPrepend3; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; $XMLTVFiles="c:\xmltv\1.xml","C:\Program Files\SageTV\SageTV\2.xml",$RenumberPrepend2,$RenumberPrepend3 ; ;;;;;;;;;;;;;;;;;;NO MORE CONFIGURATION AFTER THIS POINT;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Break On For each $File in $XMLTVFiles Open(1,$File) Del "C:\Program Files\SageTV\SageTV\xmltv_channel_ids.txt" Open(2,"C:\Program Files\SageTV\SageTV\xmltv_channel_ids.txt",5) ;Open(3,"c:\xmltv\channel_ids2.txt",5) Do $chanidpre=Readline(1) IF instr($chanidpre,"channel id=") IF instr($chanidpre,"www.mtepgdplu.com") $Longpre=Readline(1) $numberpre=Readline(1) $Shortpre=Readline(1) Else Readline(1) Readline(1) $numberpre=Readline(1) $Shortpre=Readline(1) $Longpre=Readline(1) ENDIF $chanidspl=split($chanidpre,'"') $chanid=$chanidspl[1] $numbersplpre=split($numberpre,">") $numberspl=split($numbersplpre[1],"<") SELECT Case $File=$RenumberPrepend1 $number="1"+$numberspl[0] Case $File=$RenumberPrepend2 $number="2"+$numberspl[0] Case $File=$RenumberPrepend3 $number="3"+$numberspl[0] Case $File=$RenumberPrepend4 $number="4"+$numberspl[0] Case $File=$RenumberPrepend5 $number="5"+$numberspl[0] Case $File=$RenumberPrepend6 $number="6"+$numberspl[0] Case $File=$RenumberPrepend7 $number="7"+$numberspl[0] Case $File=$RenumberPrepend8 $number="8"+$numberspl[0] Case $File=$RenumberPrepend9 $number="9"+$numberspl[0] Case 1 $number=$numberspl[0] ENDSELECT $shortsplpre=split($shortpre,">") $shortspl=split($shortsplpre[1],"<") $short=$shortspl[0] IF instr($short," ") $shortsplpost=split($shortspl[0]) $short=$shortsplpost[1] ENDIF $longsplpre=split($longpre,">") $longspl=split($longsplpre[1],"<") $long=$longspl[0] Writeline(3,$chanid+",") WriteLine(2,"channel.$chanid.numbers=$number"+ @CRLF) WriteLine(2,"channel.$chanid.names=$short, $long"+ @CRLF) ENDIF Until instr($chanidpre,"