Dutch XML Grabber standard in installation
I would like to see the dutch channel grabber standard in LinHes! It's such a drag to install it over and over. I use this one: http://www.caliban.org/ruby/xmltv_upc.shtml. UPC is the biggest TV provider in Holland, so it should be a really good addition!
Can you please provide information on 'making' the grabber. I don't speak the language.
Ofcourse, here we go!
First install Ruby (At least version 1.8.0). tv_grab_nl_upc makes use of the REXML(http://germane-software.com/software/rexml/)-bibliotheek of Sean Russell.
Download the last version of the grabber (http://www.caliban.org/files/ruby/tv_grab_nl_upc) and set this as root (or sudo) in /usr/local/bin.
Download the latest version of the wrapper (http://www.caliban.org/files/ruby/tv_grab_nl_upc_wrapper) and also put this in /usr/local/bin.
Make the grabber and the wrapper executable: chmod a+x /usr/local/bin/tv_grab_nl_upc*
Now make the configuration file with all channels where you want to get the information from. The fastest way is to start the program with the --configure option.
The configuration file is standard written on ~/.xmltv/tv_grab_nl_upc.conf, but you can also use another location with the help of the --config-file option.
- The first time you use the grabber it can take up to 30 minutes or so, the second time it will be faster.
Let the program run one or twice with hand by the command: /usr/local/bin/tv_grab_nl_upc by the same user that started mythfrontend:
/usr/local/bin/tv_grab_nl_upc --sanity-check --verbose
You can check here if everything runs well, if its so there will be a lot of XML data flash on your screen. If not you will be presented an error.
If the program seems to work okay, you can try to call it throught the wrapper; I think this is handy. The wrapper gives all options on the commandline through to tv_grab_nl_upc and calls mythfilldatabase in a correct way to add the data MythTV. The wrapper (in a simple way) looks like this:
xml_file=$( mktemp -p ~/.xmltv upc.XXXXXXXXXX )
LANG=nl_NL /usr/local/bin/tv_grab_nl_upc $* > $xml_file
mythfilldatabase --file $video_source $xml_file
Probably you need to change the $video source. In my case (and many other dutch girls/boys) have 1 source configured as the analogou channelpackage.
BE AWARE: Until MythTV 0.20 you had to call mythfilldatabase bij hand (with --file) to get the data from tv_grab_nl_upc into MythTV. This was becease MuthTV only could handle a standard list of grabbers and tv_grab_nl_upc not automaticly could be called by mythfilldatabase.
Since MythTV 0.21 it is possible to (on forehand) config your own grabbers in MythTV. This is done in mythtvsetup.
So, try /usr/local/bin/tv_grab_nl_upc_wrapper. If it is ok, you will see a couple of messages from mythfilldatabase:
- bypassing grabbers, reading directly from file
2006-09-17 14:20:57.863 Using runtime prefix = /usr
2006-09-17 14:20:57.882 New DB connection, total: 1
2006-09-17 14:20:57.887 Connected to database 'mythconverg' at host: localhost
2006-09-17 14:20:58.406 New DB connection, total: 2
2006-09-17 14:20:58.407 Connected to database 'mythconverg' at host: localhost
2006-09-17 14:20:59.194 Updating icons for sourceid: 2
2006-09-17 14:20:59.195 New DB connection, total: 3
2006-09-17 14:20:59.196 Connected to database 'mythconverg' at host: localhost
Andere meldingen over toevoegingen en verwijderingen weggeknipt...
2006-09-17 14:21:12.871 Keeping 7 days of data.
2006-09-17 14:21:13.076 Adjusting program database end times.
2006-09-17 14:21:13.274 0 replacements made
2006-09-17 14:21:13.274 Marking generic episodes.
2006-09-17 14:21:13.399 Found 0
2006-09-17 14:21:13.400 Marking repeats.
2006-09-17 14:21:13.511 Found 0
2006-09-17 14:21:13.511 Unmarking new episode rebroadcast repeats.
2006-09-17 14:21:13.620 Found 0
2006-09-17 14:21:13.928 Marking episode first showings.
2006-09-17 14:21:17.422 Found 5206
2006-09-17 14:21:17.422 Marking episode last showings.
2006-09-17 14:21:20.902 Found 5206
2006-09-17 14:21:20.941 =============================================================== | Attempting to contact the master backend for rescheduling. | | If the master is not running, rescheduling will happen when | | the master backend is restarted. | ===============================================================
2006-09-17 14:21:20.945 Connecting to backend server: 127.0.0.1:6543 (try 1 of 5)
2006-09-17 14:21:20.946 Using protocol version 30
2006-09-17 14:21:20.989 mythfilldatabase run complete.
As last thing you will need to add a crontab-entry for tv_grab_nl_upc_wrapper, so the programm info will be updated daily. So run crontab -e as the user that has started mythfrontend opstart and put something like:
35 05 * * * nice /usr/local/bin/tv_grab_nl_upc_wrapper > /var/log/mythtv/mythfilldatabase.log 2>&1
into the crontab editor.