[mythtvnz] Epgsnoop how to use mythfilldatabase to load the listings.xml data
Steve Hodge
stevehodge at gmail.com
Sat Jul 10 07:49:58 BST 2010
On Sat, Jul 10, 2010 at 9:56 AM, tim Lockyer <drtimlockyer at gmail.com> wrote:
> Thanks a lot for all your help. I am making good progress. Have two more
> questions. I know how to use crontab but do not understand the
> http://your.epg.source.gz
>
> First:
>
> After you have it working you can add a crontab entry like so:
>
> wget http://your.epg.source.gz -O - |gunzip|mythfilldatabase -file 1
>
In your case you wouldn't do that, you'd call epgsnoop to get the data
rather than wget. Probably best to write a script that does all the grabbing
and loading of the data and call that either from crontab or have myth
itself call it periodically (it can be setup in in mythtv-setup IIRC). My
script looks like this:
#!/bin/sh
export QTDIR=/usr/lib/qt3
rm -f /home/mythtv/listings-*.xml
rm -f /home/mythtv/listings_freeview-*.xml
dvbstream -s 22500 -o:/dev/null -f 1371 -p h -n 60 8192 &
/home/mythtv/tv_grab_dvb -s --skynz-ratings
--category-map=/home/mythtv/categories_skynz -o 12 >
/home/mythtv/listings-$$.xml
mythfilldatabase --update --file 1 /home/mythtv/listings-$$.xml
mythfilldatabase --update --file 2 /home/mythtv/listings-$$.xml
killall dvbstream
sleep 5
dvbstream -s 22500 -o:/dev/null -f 1183 -p h -n 60 8192 &
/home/mythtv/tv_grab_dvb -s --category-map=/home/mythtv/categories_freeview
-o 12 > /home/mythtv/listings_freeview-$$.xml
mythfilldatabase --update --file 2 /home/mythtv/listings_freeview-$$.xml
killall dvbstream
dvbstream tunes the DVB-S adapter and starts streaming data from it to
/dev/null. tv_grab_dvb monitors the packets from the adapter and extracts
the EIT data to a file. The --update argument to mythtfilldatabase stops it
from messing with the channel setup (I prefer to do that stuff manually).
I'm not using epgsnoop - you'd want to replace the tv_grab_dvb line with the
appropriate call to epgsnoop (and possibly that would also take care of the
tuning, I'm not sure). What I do is grab the Sky listings and apply them to
both Sky and Freeview sources as this ensures I have identical data for the
common channels. I then grab the Freeview listings and apply those to get
data for the Freeview-only channels.
If you search the archives you might find a similar script written for
epgsnoop.
Cheers,
Steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ourshack.com/pipermail/mythtvnz/attachments/20100710/d048348d/attachment.htm
More information about the mythtvnz
mailing list