You are on page 1of 5

The Interactive TV Guide How-To

Written by cruent 2005

1. Setup of the XMLTV application

1.1 How to get the XMLTV application
Download from here: (current version 0.5.39)
http://sourceforge.net/projects/xmltv

1.2 Unpak the XMLTV application
Extract to any directory on your workstation

1.3 Configure the XMLTV application
Configure the XMLTV application to use the grabber for your country.

Table 1. Currently supported country grabbers are listed below(version 0.5.39):
Country Grabber
United Kingdom tv_grab_uk_rt
Canada and United States tv_grab_na_dd, tv_grab_na
Germany tv_grab_de_tvtoday
New Zealand tv_grab_nz
Finland tv_grab_fi
Italy tv_grab_it
Spain tv_grab_es, tv_grab_es_digital
Netherlands tv_grab_nl, tv_grab_nl_wolf
Denmark tv_grab_dk
Hungary and Romania tv_grab_huro
Japan tv_grab_jp
Sweden tv_grab_se
France tv_grab_fr
Norway tv_grab_no
Portugal tv_grab_pt

Choose the channels you wish to grab.
Run: "xmltv.exe tv_grab_dk --configure"

1.4 Getting the listings for your channels
Keep the listings to one day, it's smaller in size, faster to upload/download and faster to
navigate in the tv guide.
Run: "xmltv.exe tv_grab_dk --days 1 --output listing.xml"
Wait for it to finish, it takes a while...

Step 1 done.

Python script for XBox Media Center Page 1/5
The Interactive TV Guide How-To
Written by cruent 2005

2. Setup of the TV Guide python script

2.1 Extract and upload the Tv Guide script to your XBMC scripts directory
Extract the package and upload the following files:

tvguide.py Æ XBMC\scripts\tvguide.py
tvguide\ Æ XBMC\scripts\tvguide\
tvguide\background.png Æ XBMC\scripts\tvguide\background.png
tvguide\showbox.png Æ XBMC\scripts\tvguide\showbox.png
tvguide\timeline.png Æ XBMC\scripts\tvguide\timeline.png
tvguide\listing\ Æ XBMC\scripts\tvguide\listing\
tvguide\listing\listing.xml Æ XBMC\scripts\tvguide\listing\listing.xml

2.2 Upload the listing.xml file to your XBMC scripts directory

Upload the new listing.xml file created by the XMLTV application from your workstation to your
xbox and overwrite the dummy file.

xmltv\listing.xml Æ XBMC\scripts\tvguide\listing\listing.xml

2.3 Settings for the Tv Guide script
Edit the XBMC\scripts\tvguide.py script and search for “### Config settings”.

If you want sorted channels in the Tv Guide, change the sorted value to true, or if not keep it
default to false.
sorted = “false”

If you don’t want an overlapped timeline to show your xbox time, change the timeline value to
false, or keep it to default true.
timeline = "true"

If you want automatic download of the listing.xml, change the downloadsupport value to http
or ftp (remember to change the httpurl or the ftpurl) and if not keep the default none.
downloadsupport = "none"

If http support is wanted, you need to change the httpurl to the http service path with the
listing.xml.
httpurl = "http://192.168.1.2:80/listing.xml"

If ftp support is wanted, you need to change the ftpurl to the ftp service path with the
listing.xml.
ftpurl = "ftp://xbox:tvguide@192.168.1.2:21/listing.xml"

Remember to save your changes.

Step 2 done.

Python script for XBox Media Center Page 2/5
The Interactive TV Guide How-To
Written by cruent 2005

3. Controls in the TV Guide python script

Table 2. Current controls in the TV Guide script.
Control (remote/controller) Description
Left/Dpad Left Go 30 mins backward
Right/Dpad Right Go 30 mins forward
-/Left trigger Go 30 mins backward
-/Right trigger Go 30 mins forward
Up/Dpad Up Go one channel up
Down/Dpad Down Go one channel down
Select/’A’ Show description from the selected show
Back/’B’ Goto current time/Return from description
Menu/Back Exit

Now go and enjoy the TV Guide script in XBMC.

Cheers

/cruent

Python script for XBox Media Center Page 3/5
The Interactive TV Guide How-To
Written by cruent 2005

4. Hint – Change the channel order
You can modify the XMLTV application config file (.xmltv\tv_grab_xx.conf) file to grab the
listings in the order you want them shown in the TV Guide, like this:

From: (snip only)
channel 005 3+
channel 006 TV3
channel 007 Kanal 5
channel 008 Tv Danmark

To: (snip only)
channel 005 3+
channel 008 Tv Danmark
channel 007 Kanal 5
channel 006 TV3

Remember to set the sorted value to false in the XBMC\scripts\tvguide.py under "### Config
settings", so it keeps the right channel order.

5. Hint – Add the TV Guide in the Submenu for faster access
Modify XBMC\skin\Project Mayhem III\Pal\DialogSubMenu.xml (this is for Pal users!)

Find the next empty control for the submenu:
<control>
<description>SubMenu button</description> <visible>no</visible>
<type>button</type> <execute>q:\scripts\-.py</execute>
<id>XXXX</id> <label>-</label>

Change it to:
<control>
<description>SubMenu button</description> <visible>yes</visible>
<type>button</type> <execute>q:\scripts\tvguide.py</execute>
<id>XXXX</id> <label>TV Guide</label>

XXXX is the id number, just leave it and remember to set the visible to yes.

6. Hint - Automatic download from PC /w listing.xml to XBMC
Make a batch file on the PC /w listing.xml in the XMLTV directory.

@ECHO OFF
ECHO XML TV Guide setup by cruent

ECHO Configure the channels, remove the REM on the next line(use your own grabber country)
REM xmltv.exe tv_grab_dk --configure

ECHO Getting the listings for today
xmltv.exe tv_grab_dk --days 1 --output listing.xml

Make it run every day or at pc boot time to get new listings each day.
Copy the listing.xml file to a web/ftp service path with list/read rights atleast (You can also put
this in the batch file).
Configure the tvguide.py script under "### Config settings" to use the correct ftp/http url.

Python script for XBox Media Center Page 4/5
The Interactive TV Guide How-To
Written by cruent 2005

7. Hint - Automatic upload from PC /w listing.xml to XBMC
Just append this to the above batch file and make sure your Xbox is online.

ECHO Upload listing.xml to the XBOX

> script.ftp ECHO open 192.168.1.2 21
>>script.ftp ECHO xbox
>>script.ftp ECHO xbox
>>script.ftp ECHO cd /f
>>script.ftp ECHO cd /f:
>>script.ftp ECHO cd Apps\xbmc\scripts\tvguide\listing
>>script.ftp ECHO binary
>>script.ftp ECHO prompt n
>>script.ftp ECHO put listing.xml
>>script.ftp ECHO bye

REM Use the temporary script for unattended FTP
FTP -s:script.ftp

REM For the paranoid: overwrite the temporary file before deleting it
TYPE NUL >script.ftp
DEL script.ftp

Change the 192.168.1.2 to your XBOX ip address and the f: Apps\xbmc\scripts\tvguide\listing.
Configure the tvguide.py script under "### Config settings" to use the downloadsupport value
set to none.

Python script for XBox Media Center Page 5/5