[mythtvnz] Help-can't get grabber and mythfilldatabase to work right
Stephen Worthington
stephen_agent at jsw.gen.nz
Sun Apr 28 03:01:22 BST 2013
On Sun, 28 Apr 2013 11:24:39 +1200, you wrote:
>
>>>
>>> You can try running the EPG update manually. Run a terminal and login
>>> as the user that runs mythfrontend. Download the EPG file with wget
>>> and uncompress it with gzip -d. Then run:
>>>
>>> mythfilldatabase --help
>>>
>>> to see all the options for running it. I think this is what is
>>> needed:
>>>
>>> mythfilldatabase --update --file --sourceid 1 --xmlfile <path to the
>>> xml file>
>>>
>>> It is a while and two MythTV versions since I last had to do this, so
>>> the options have changed a bit. If your sourceid is not 1, change
>>> that to the correct value. When run like that, I think the log will
>>> go to the terminal, so you might want to add:
>>>
>>> 2>&1 >mythfilldatabase.log
>>>
>>> and possibly:
>>>
>>> --loglevel debug
>>>
>>> Does that work? Are there any errors?
>>>
>> That works! no errors that I can see and 8 days of data in the
>> schedule.System info page tags the update as successful.
>> -Paul
>
>So what is different between the grabber getting the data and me doing it
>manually?
>In what folder does the grabber create the EPG file?
>I don't appear to get any file not found errors in the mythfilldatabase
>terminal output.
>
>-Paul
The tv_grab_nz.py grabber does not download the EPG data to a file -
it reads it directly into a Python variable in memory. It processes
that data and normally writes it out to stdout to pass it on to the
mythfilldatabase process that called tv_grab_nz.py. There seems to be
an option to get it to write the data to a file instead of to stdout,
and another option ("cache") to get it to write the data to a file and
to stdout. But I have never used either option.
In fact, I do not use tv_grab_nz.py in the standard manner at all
myself. I have to generate EPG for my Sky channels, so I actually run
a script that uses wget to get the Freeview EPG and also runs epgsnoop
to get the Sky EPG. It stores both in /var/www/epg so that other PCs
that do TV recording on my network can download the EPG files from the
web server on my MythTV box, and then runs mythfilldatabase.
Mythfilldatabase runs modified versions of tv_grab_nz.py that get
their EPG files from the MythTV box web server, one for the FreeviewHD
source and one for the SkyNZ source. I run the script that does this
from a cron job once a day at 15:10.
I think we need to check some basics:
1) Is the version of tv_grab_nz-py you are running the latest 0.2.6
one? If not, get the latest from here:
http://nice.net.nz/tv_grab_nz-py/
2) Have you placed the tv_grab_nz-py file in /usr/local/bin/ ?
3) Have you set the permissions on tv_grab_nz-py to allow execution by
mythfilldatabase when it is running under user/group mythtv?
4) What is the name of the source you are using for the Freeview
channels? There should be a file in the home directory of the user
that runs mythfilldatabase that specifies the channels. It is in the
~/.mythtv directory and is named <your source name>.xmltv. Because I
run my mythfilldatabase from a script run by user stephen, mine is
/home/stephen/.mythtv/FreeviewHD.xmltv, but yours may be in
/home/mythtv/.mythtv - I am not sure where it goes when you are
running tv_grab_nz-py from mythfilldatabase in the normal manner. What
is the contents of yours?
5) Have you changed the SOURCES declaration at the head of the
tv_grab_nz-py file to this:
SOURCES = (
'http://epg.org.nz/freeview.xml.gz',
)
6) Have you checked the spelling of the grabber specified for the
Freeview source. This SQL will show you the setup of your sources:
select * from videosource;
and this will show which source or sources are configured to actually
be used:
select distinct sourceid from cardinput;
When people have been having problems configuring things and have
tried multiple times, there can be multiple sources configured, which
confuses things.
7) If you do this:
cd /var/log/mythtv
grep -i mythfilldatabase *
does it show any useful information?
More information about the mythtvnz
mailing list