[mythtv-users] Multiple XMLTV sources

David myth at dgreaves.com
Tue Mar 16 14:33:36 EST 2004


well :)

can't you just move the provided scripts aside and provide your own?

I've not got around to merging yet but here's my tv_grab_uk script:

#!/usr/bin/perl -w
use Getopt::Long;
my $tv_datafile="/tmp/tvdata.bz2";

my ($days, $config, $output) = ("","","");

# options (not documented that I could see but hardwired into the 
mythfilldatabase source!)
GetOptions ("days:i" => \$days,
            "config-file:s"   => \$config,
            "output:s"  => \$output);

# Grab a new datafile if it's not there or if it's over 12hrs old
if ( (! -f $tv_datafile ) || ( -f $tv_datafile && -M $tv_datafile > 0.5 ) )
  {
    system "wget -q -O $tv_datafile -U 'wget_MythTV_script,personal - 
myth\@dgreaves.com' 
'http://www.bleb.org/tv/data/listings?days=-1..6&format=xmltv&channels=bbc1,bbc2,itv1,ch4,five,bbc3,bbc4,bbc7,bbc_6music,bbc_news24,bbc_radio1,bbc_radio1_xtra,bbc_radio2,bbc_radio3,bbc_radio4,boomerang,bravo,british_eurosport,cartoon_network,challenge,discovery,e4,ftn,itv2,paramount,scifi,sky_one,sky_one_mix,uk_bright_ideas,uk_drama,uk_gold,uk_gold2,uk_history,uk_horizons,uk_style&file=bzip2'";
  }

# This script should emit xmltv xml, so...
system "bzcat $tv_datafile".($output?"> $output":"");


so you could run both scripts and then do:
grep -v "</tv>" xml_source1.xml > both.xml
tail +4 xml_source2.xml >> both.xml

You could write proper xslt or perl but I'm way too lazy ;)
The principle is to have a balanced XML file.

The input is parsed by the Qt XML reader which shouldn't give a diddly 
about the order that channels/programmes etc appear
(if this fails then it's a bug in the XML parsing)

David

Preston Crow wrote:

>On Tue, 2004-03-16 at 12:56, steve at nexusuk.org wrote:
>  
>
>>Is it possible to set up more than one source per input?  i.e. I get all 
>>my channels from my satellite decoder through S-Video, but I want to get 
>>the listings for some channels from one xmltv source (bleb.org) and the 
>>listings for other channels from another xmltv source (tv_grab_uk_rt).  
>>    
>>
>
>I would like to do the same thing here in the USA.  Many channels
>provide their own listings pages that go much farther in the future and
>provide more detail than you can get from the aggregate sites.  Cartoon
>Network is notorious for not sending episode titles, let alone
>descriptions while their own web site has all the details.
>
>Given the ability to get listings from a given source on a per-channel
>basis, I could envision a setup where most channels get their listings
>direct from the network, with zap2it.com only being used for the lineup
>information, except when a given channel's information isn't available
>directly.
>
>BTW: I expect someone will reply with a pointer to an xmltv list saying
>that this is more appropriate there (and they're probably right).
>
>--PC
>
>
>  
>
>------------------------------------------------------------------------
>
>_______________________________________________
>mythtv-users mailing list
>mythtv-users at mythtv.org
>http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>  
>


More information about the mythtv-users mailing list