[mythtv-users] of crontab, tv_grab, and mythfilldatabase

Paul Graydon graydpau at hhc.ac.uk
Tue Nov 22 04:53:42 EST 2005


I'm getting frustrated and irritated by what should, to all intents and purposes, be a simple task.
I'm running a Gentoo box with dual DVB-T cards, and Mythtv.  The aim is to provide a simple, 
reliable method for the resources staff at this college to record programs for use in classroom and 
export onto DVD.
Everything is working fine under Gentoo, I had issues with other distros for various reasons that 
seemed to me rather distro specific (e.g. circular rpm dependancies under RHES).
Gentoo might have taken longer to initially setup, but I've had so little hassle actually getting 
it to work in comparison to the others!
The guide here: http://gentoo-wiki.com/HOWTO_Setup_MythTV was extremely useful.

There is just one task that I'm struggling with.  The automatic downloading and importing of XML tv 
data from the Radio Times website, using tv_grab_uk_rt.  I can get neither "mythfilldatabase --
quiet" nor the same variant of tv_grab_uk_rt to successfully download the file.  Following a script 
I dug up from the mythtv-user archives I put the following in place in a file called tv.sh:

####################
{
rm -f /media/dvb.xml
date
/root/env.sh
perl /usr/bin/tv_grab_uk_rt --config-file /root/.mythtv/RadioTimes.xmltv --quiet > /media/dvb.xml
/usr/bin/mythfilldatabase --file 2 -1 /media/dvb.xml

} >> /root/log.log 2>&1

####################

/media is the location of a separate partition for recording.

If I run this manually, i.e. ./tv.sh, it all works fine.  Off it goes to the internet, fetches the 
data and imports it into the database.  Same occurs with mythfilldatabase --quiet, if I run it 
manually it works.
If I run that as a crontab process, on the root users crontab, it fails to fetch the information 
from the internet and its baffling me as to why.
My initial thought was that maybe it hadn't picked up the proxy environment variables, hence the 
calling of the "env.sh" script which just exports the proxy variables.  That hasn't solved the 
issue, and I'm beginning to pull my hair out.
Given the length of time it takes to run the tv_grab command when its called by cron, it looks to 
me like the program is timing out on its fetching of info.
The following is an output from my log.log file (imaginative name, huh!).

##########################

Tue Nov 22 09:36:01 GMT 2005
All data is the copyright of the Radio Times website
<http://www.radiotimes.com> and the use of this data is restricted to
personal use only.

could not fetch http://xmltv.radiotimes.com/xmltv/channels.dat, aborting
### bypassing grabbers, reading directly from file
2005-11-22 09:39:02.734 New DB connection, total: 1
2005-11-22 09:39:02.755 New DB connection, total: 2
Error in 1:1: unexpected end of file
Updating icons for sourceid: 2
Updated programs: 0  Unchanged programs: 0
Adjusting program database end times...
0 replacements made.
Marking repeats...found 0
Unmarking repeats from grabber that fall within our new episode window...found 0
2005-11-22 09:39:04.454 Connecting to backend server: localhost:6543 (try 1 of 5)
2005-11-22 09:39:04.473 Using protocol version 15

##########################


Can anyone help me at all? Offer any perls of wisdom?
-----
Paul Graydon
Network Technician
Haywards Heath College
http://www.hhc.ac.uk (01444) 456281
"Joy is not in things; it is in us."   Richard Wagner




More information about the mythtv-users mailing list