[mythtv] DVB patch for Freeview/Xtraview

Charlie Brej brejc8 at vu.a.la
Tue Apr 12 21:04:54 UTC 2005


Also I wrote a little script to fetch the guide for xtraview since off air guide 
isn't there and RadioTimes doesnt have one.
-- 
         Charlie Brej
APT Group, Dept. Computer Science, University of Manchester
Web: http://www.cs.man.ac.uk/~brejc8/ Tel: +44 161 275 6844
Mail: IT302, Manchester University, Manchester, M13 9PL, UK
-------------- next part --------------
export TEMP=/tmp/
export GRAB_OPTS="--quiet"
export WEEKEND=`for DAY in monday tuesday wednesday thursday friday; do echo --not --start \`date --date=$DAY +%Y%m%d\` ; echo --not --start \`date --date=next\ week\ $DAY +%Y%m%d\`; done;`
export WEEKDAY=`for DAY in saturday sunday; do echo --not --start \`date --date=$DAY +%Y%m%d\` ; echo --not --start \`date --date=next\ week\ $DAY +%Y%m%d\`; done;`

echo channel boomerang.cartoonnetwork.com > $TEMP/boomerang.channels
echo channel uk.cartoonnetwork.com > $TEMP/cartoon_network.channels
echo channel discoveryeurope.com > $TEMP/discovery.channels
echo channel home.discoveryeurope.com > $TEMP/discovery_hl.channels
echo channel tcm.turner.com > $TEMP/tcm.channels
echo channel uk-food.flextech.telewest.co.uk > $TEMP/uk_food.channels
echo channel uk-gold.flextech.telewest.co.uk > $TEMP/uk_gold.channels
echo channel uk-style.flextech.telewest.co.uk > $TEMP/uk_style.channels
echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?><!DOCTYPE tv SYSTEM \"xmltv.dtd\"><tv>\
    <channel id=\"xtraview.co.uk\"><display-name>Xtraview</display-name></channel>\
    </tv>" >$TEMP/xtraviewhead.xmltv


tv_grab_uk_rt $GRAB_OPTS --config-file $TEMP/boomerang.channels \
    |tv_grep --start "^........0[678]...." \
    |tv_grep --stop  "^........0[678]...." --or --stop "^........090000" \
    |sed s/channel=\"boomerang.cartoonnetwork.com/channel=\"xtraview.co.uk/ > $TEMP/boomerang.xmltv
    
tv_grab_uk_rt $GRAB_OPTS --config-file $TEMP/discovery_hl.channels \
    |tv_grep --start "^........09...." --or --start "^........1[01]...." \
    |tv_grep --stop  "^........09...." --or --stop  "^........1[01]...."  --or --stop "^........120000" \
    |sed s/channel=\"home.discoveryeurope.com/channel=\"xtraview.co.uk/ > $TEMP/discovery_hl.xmltv
    
tv_grab_uk_rt $GRAB_OPTS --config-file $TEMP/cartoon_network.channels \
    |tv_grep $WEEKEND --start "^........1[45]...." --or --start "^........1[23]...." --or --start "^........1[67]...." \
    |tv_grep $WEEKEND --stop  "^........1[45]...." --or --stop  "^........1[23]...." --or --stop  "^........1[67]...." \
                                                --or --stop  "^........180000" --or $WEEKDAY --stop  "^........140000" \
    |sed s/channel=\"uk.cartoonnetwork.com/channel=\"xtraview.co.uk/ > $TEMP/cartoon_network.xmltv
    
tv_grab_uk_rt $GRAB_OPTS --config-file $TEMP/uk_food.channels \
    |tv_grep $WEEKDAY --start "^........1[45]...." \
    |tv_grep --stop           "^........1[45]...." --or --stop  "^........160000" \
    |sed s/channel=\"uk-food.flextech.telewest.co.uk/channel=\"xtraview.co.uk/ > $TEMP/uk_food.xmltv
    
tv_grab_uk_rt $GRAB_OPTS --config-file $TEMP/uk_style.channels \
    |tv_grep --start "^........18...." \
    |tv_grep --stop  "^........18...." --or --stop  "^........190000" \
    |sed s/channel=\"uk-style.flextech.telewest.co.uk/channel=\"xtraview.co.uk/ > $TEMP/uk_style.xmltv
    
tv_grab_uk_rt $GRAB_OPTS --config-file $TEMP/uk_gold.channels \
    |tv_grep $WEEKDAY \
    |tv_grep --start "^........19...." --or --start "^........20...." \
    |tv_grep --stop  "^........19...." --or --stop  "^........20...." --or --stop  "^........210000" \
    |sed s/channel=\"uk-gold.flextech.telewest.co.uk/channel=\"xtraview.co.uk/ > $TEMP/uk_gold.xmltv
    
tv_grab_uk_rt $GRAB_OPTS --config-file $TEMP/tcm.channels \
    |tv_grep $WEEKEND \
    |tv_grep --start "^........19...." --or --start "^........20...." \
    |tv_grep --stop  "^........19...." --or --stop  "^........20...." --or --stop  "^........210000" \
    |sed s/channel=\"tcm.turner.com/channel=\"xtraview.co.uk/ > $TEMP/tcm.xmltv
    
tv_grab_uk_rt $GRAB_OPTS --config-file $TEMP/discovery.channels \
    |tv_grep --start "^........2[12]...." \
    |tv_grep --stop  "^........2[12]...." --or --stop "^........230000" \
    |sed s/channel=\"discoveryeurope.com/channel=\"xtraview.co.uk/ > $TEMP/discovery.xmltv


tv_cat $TEMP/xtraviewhead.xmltv $TEMP/boomerang.xmltv $TEMP/cartoon_network.xmltv $TEMP/discovery.xmltv \
    $TEMP/discovery_hl.xmltv $TEMP/tcm.xmltv $TEMP/uk_food.xmltv $TEMP/uk_gold.xmltv $TEMP/uk_style.xmltv |tv_sort

rm $TEMP/boomerang.channels $TEMP/cartoon_network.channels $TEMP/discovery.channels $TEMP/discovery_hl.channels \
    $TEMP/tcm.channels $TEMP/uk_food.channels $TEMP/uk_gold.channels $TEMP/uk_style.channels $TEMP/boomerang.xmltv \
    $TEMP/cartoon_network.xmltv $TEMP/discovery.xmltv $TEMP/discovery_hl.xmltv $TEMP/tcm.xmltv $TEMP/uk_food.xmltv \
    $TEMP/uk_gold.xmltv $TEMP/uk_style.xmltv $TEMP/xtraviewhead.xmltv



More information about the mythtv-dev mailing list