Making a Swedish TiVo - Part 3
Written by Stephen Baines   
Saturday, 04 April 2009

Part 3 is where the magic happens.

First, unless you have access to a Linux/Unix type machine, you probably won't get any further. Either learn linux (nice ask, isn't it?), or find someone friendly who might be able to help you with making the slices. Maybe someone else who has a TiVo in Sweden could help?

 

 

Using XMLTV GUI to "nicify" the data

If you aren't using Windows, don't panic. Move onto page 2. It's not drastic!

Start XMLTV GUI, and go to the settings.

 

Make sure the timezone is set to +00:00

Choose a file to write to with the "final" data.

Check sort data.

Go to the grabbers tab

If you are using the ONTV.DK service, choose that grabber.

Otherwise, just choose the XMLTV_Import grabber.

If you are using ONTV.DK, click on it, and click settings.

Paste in your XMLTV URL from the site. Click OK.

If you are only using the grabbers, highlight that and click settings.

 Add the files for your XMLTV grabbed file AND your MC2XML file if you are using that also.

Click OK.

Now create a batch file called update.bat and put in the following.

set tz=UTC
cd c:\xmltv
xmltv tv_grab_se --days 14 --output sweden.xml
mc2xml -c se -g 241 -u
"C:\Program Files\XMLTV GUI\xmltvgui.exe" /grab /d14

This batch file will make sure the time zone is set right when grabbing the listings, then also grab the mc2xml listings, then automatically run XMLTV GUI and process the data to create just one file. In my example, it's called tvguide.xml

 

Preparing to Create Slices

You need to download the xmltv2tivo.tar file to a Linux/Unix machine and unpack it. Change to the directory and do a make.

I've prepared a replacement zap2itgenres.txt file for the genres I've found to date mapped to TiVo genres.

You need to now edit the stations.txt file

In this file you put the "TiVo Number" from day 2 and the XML channel name. Edit the xml file you created to find out their name. So for example, in my file I have for "Canal+ Action"

  <channel id="XMLTV_Import_action.canalplus.se">
    <display-name lang="sv">CANAL+ Action</display-name>
    <icon src="http://xmltv.tvsajten.com/chanlogos/action.canalplus.se.png"/>
  </channel>
 

 So in stations.txt I need

# XMLTV RFC2838 channel name    Tivo Channel FSID
"XMLTV_Import_first.canalplus.se" 7300101
"XMLTV_Import_comedy.canalplus.se" 7300102
"XMLTV_Import_drama.canalplus.se" 7300103
"XMLTV_Import_hits.canalplus.se" 7300104
"XMLTV_Import_action.canalplus.se" 7300105

 For my first example channels I gave before. Continue for all the rest of the channels. If you are using Excel or Openoffice to do this work for you, it's easier...

Compiling the slices

The following command makes the slices.

./xmltv2tivo /shared/xmltv/tvguide.xml | ./writeguide > update.slice

 Change the paths to suit your location. If you didn't download and use my zap2itgenres.txt file, you'll get a lot of messages flashing by. You may still if the genres have changed since I last updated it... It's not a major worry. It'll just mean it's less easy to search by genre, and may affect suggestions.

Uploading the slices

FTP the slice to your TiVo's /var/hack/guide directory in binary, then telnet to your TiVo as before.

Change to the /var/hack/guide directory and type the following.

tivosh dbload25.tcl update.slice

Wait for that to complete.

Then type

tivosh fixup25.tcl

And wait for that to complete.

Now do the following

tivosh force_index.tcl
touch /var/timestamp

And indexing will complete. 

Congrats! You now have a Swedish TiVo with 2 weeks of data. When the data runs out, compile a new slice and repeat.

DON'T do it before the slice runs out, otherwise you'll end up with duplicate data. I'm working on fixing that!

 

 

 

 

Last Updated ( Saturday, 04 April 2009 )