[mythtvnz] Free to Air BBC World on TV One - best way to 'inject' bbc.co.uk guide data after Freeview EPG update?

Wade Maxfield mythtvnz@lists.linuxnut.co.nz
Mon, 16 Jul 2007 00:21:08 +1200


>
>>>     Problem is I'm not aware of any hooks in myth which would enable this,
>>>     or even whether the BBC transmission is live-to-air or timeshifted.
>>>
>>>
>>>mythfilldatabase. You don't have to use Myth to grab the EIT data.
>>>
>>Right so have some external bash script or similar on a cron job 
>>grabbing data from the various sources and writing to the database? 
>>I was hoping to avoid over-riding the EIT gathering Myth does, just 
>>trigger a post-process operation which 'fills in the gaps' for the 
>>Beeb stuff.
>
>
>Well, if you check out the Sky TV guide on their site, and compare 
>that to what you can actually see on TV One  one evening, and if it 
>looks about right then:
>Use your dvb-s card, a grab_dvb script, and mythfilldatabase, and 
>massage the program table afterwards.
>If you only define BBC world (1026.dvb.guide on my system) then when 
>you import, all the other channels data will be ignored. Then do a 
>REPLACE/SELECT from BBC World to TV One for the missing time period.
>Call mythbackend --resched at the end of it all and you should be set.

Well I was up late and testing something else with livetv, and 
happened to catch some stuff on BBC World/One.  It appears to be the 
same basic schedule on Normal BBC World (via Sky) as on TV One.  This 
was only a single sample, so I may be wrong.  Anyways below is a 
basic shell script/MySQL query, to copy the necessary data from the 
Sky version of BBC World to the TV One lineup.

You'll need to figure out what the chanid for BBC World and TV One 
are in your particular channel table to make this work. Replace XXXX 
with the TV One chanid, and YYYY with the BBC World chanid.  Schedule 
this to run after every mythfilldatabase, and you're set. 8)



#!/bin/sh

#
# MySQL settings
#
HOST=yourmythtvhost
USER=yourmythtvuser
PASS=yourmythtvpassword
DB=mythconverg

mysql -u $USER -h $HOST --password=$PASS -e "

DELETE FROM program WHERE title="BBC World" AND chanid=XXXX;

REPLACE INTO program
(chanid,starttime,endtime,title,subtitle,description,category,category_type,airdate,stars,previouslyshown,title_pronounce,stereo,subtitled,hdtv,closecaptioned,partnumber,parttotal,seriesid,originalairdate,showtype,colorcode,syndicatedepisodenumber,programid,manualid)
SELECT
XXXX,starttime,endtime,title,subtitle,description,category,category_type,airdate,stars,previouslyshown,title_pronounce,stereo,subtitled,hdtv,closecaptioned,partnumber,parttotal,seriesid,originalairdate,showtype,colorcode,syndicatedepisodenumber,programid,manualid
FROM program
WHERE chanid=YYYY AND (time(starttime)>="00:00:00" AND 
time(endtime)<="06:00:00");

" $DB