[mythtv-users] How does mythtv-setup assign the tv_grab script?

Phill Edwards philledwards at gmail.com
Sun Nov 27 06:50:05 EST 2005


Here 'tis.

#!/bin/bash
# -------------------------------------------------------------------------
#
# Script : tv_grab_au - Grab Australian TV listings
# Author : Phill Edwards
# Descn  : Choose which grabber to run.
#               1st run the grabber then mythfilldatabase
#               to load the xmltv info into MythTV.
#
# -------------------------------------------------------------------------

# Configure which grabber we want to run - NineMSN or OzTiVo or D1.
USEGRAB=ninemsn
#USEGRAB=d1
#USEGRAB=oztivo

echo "tv_grab_au.sh started at `date`"
echo "tv_grab_au.sh using grabber $USEGRAB"

# Run the appropriate grabber & mythfilldatabase cmds depending on USEGRAB.
case $USEGRAB in
  ninemsn) :
     # New tv_grab_au - more "standard" mythtv format. NineMSN-based.
#     /usr/local/bin/tv_grab_au_v1.39 --config-file
/home/mythtv/.xmltv/tv_grab_au_9msn.conf
#     /usr/local/bin/tv_grab_au_v1.40 --config-file
/home/mythtv/.xmltv/tv_grab_au_9msn.conf
     # Load TV listings into mythtv database
     mythfilldatabase --file 1 7 /home/mythtv/.xmltv/tvlistings_9msn.xml
     ;;
  oztivo) :
     # Get data from OzTiVo. Logon for OzTiVo in config file
#     /usr/local/bin/tv_grab_au_tuhs.orig --days 7 --config-file
/home/mythtv/.xmltv/tv_grab_au_tuhs.py --force-explicit-timezone
--output /home/mythtv/.xmltv/tvlistings_tuhs.xml
     /usr/local/bin/tv_grab_au_tuhs --days 7 --config-file
/home/mythtv/.xmltv/tv_grab_au_tuhs.xml --force-explicit-timezone
--output /home/mythtv/.xmltv/tvlistings_tuhs.xml
     # Load TV listings into mythtv database
     mythfilldatabase --file 1 7 /home/mythtv/.xmltv/tvlistings_tuhs.xml
     ;;
  d1) :
     # Get data from d1.com.au. The channel xmltvid's are in xxxx.d1.com.au
     # format so have to sed them all to the format I use before being written
     # to the tvlistings xml file - hence the big complicated sed command.
     # Also, don't let it grab icons as it overwrites my icon settings.
     /usr/local/bin/tv_grab_au_d1 --config-file
~mythtv/.xmltv/tv_grab_au_d1.conf --no-icons --days 7 | sed
's/freesd\.Sydney\.SBS-2\.d1\.com\.au/news\.sbs\.com\.au/g ;
s/freesd\.Sydney\.7\.d1\.com.au/sydney\.seven\.com\.au/g ;
s/freesd\.Sydney\.10\.d1\.com\.au/sydney\.ten\.com\.au/g ;
s/freesd\.Sydney\.SBS\.d1\.com\.au/sydney\.sbs\.com\.au/g ;
s/freesd\.Sydney\.2-2\.d1\.com\.au/abc2\.abc\.gov\.au/g ;
s/freesd\.Sydney\.9\.d1\.com\.au/sydney\.nine\.com\.au/g ;
s/freesd\.Sydney\.2\.d1\.com\.au/nsw\.abc\.gov\.au/g' >
~mythtv/.xmltv/tvlistings_d1.xml
     # Load TV listings into mythtv database
     mythfilldatabase --file 1 7 /home/mythtv/.xmltv/tvlistings_d1.xml
     ;;
  *) :
     # Give error as this grabber isn't valid
     echo "tv_grab_au.sh error: the grabber \"$USEGRAB\" isn't valid"
     ;;
esac

echo "tv_grab_au.sh ended at `date`"


More information about the mythtv-users mailing list