Schedules Direct - information requested

For discussion related to MythTV which doesn't belong in another forum.

Moderator: Forum Moderators

Post Reply
PhilB
Senior
Posts: 403
Joined: Sun May 11, 2014 6:23 pm
Great Britain

Schedules Direct - information requested

Post by PhilB »

I'd appreciate some enlightenment on the setup for Schedules Direct as I'm trying to perfect the routines in my channel editor:
https://www.mythtv.org/wiki/Channel_Editor.

There appear to be two areas where a bit of code can help:
a) squirting the XMLTVIDs into the database
b) Generating the source files (with their 'channel=' or 'channel!' lines).

The config file is generated typically with

Code: Select all

tv_grab_sd_json --config-file ~/.xmltv/tv_grab_sd_json.conf  --output sd.xml

The file looks like this:

Code: Select all

phil@phil$ head sd.xml
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE tv SYSTEM "xmltv.dtd">

<tv source-info-url="http://www.schedulesdirect.org" source-info-name="Schedules Direct" generator-info-name="tv_grab_sd_json 0.1">
  <channel id="30644">
    <display-name>BBC One (London)</display-name>
    <display-name>BBC1LDN</display-name>
    <display-name>001</display-name>
    <icon src="https://s3.amazonaws.com/schedulesdirect/assets/stationLogos/s17153_h3_aa.png" height="270" width="360" />
  </channel>
etc
It says that the XMLTVID for 'BBC One (London)' or 'BBC1LDN' is 30644 but it doesn't quite get the name right -
the transmitted callsign here is BBC One Lon, so we have to match those manually. Some match perfectly,
others such as Channel4 +1 get matched automatically to 'Channel 4 (plus one hour)' with a bit of jiggey pokery in
the editor code, others need manual intervention. I'm acutely aware though that such rules are very UK specific and
may not work (or be necessary) elsewhere.

My first question is whether these mis-matches are just a UK phenomena, or whether they occur in other parts of the world.
If the problem also occurs elsewhere, is there anyone who could help me by supplying sample data from your region?
(I'd need a diagnostic report from the editor help>diagnostics and a copy of the matching file above. My email is at
help>version).

My second question is whether I am right in thinking that we need multiple files generated and scanned separately if we have a complex
configuration with multiple sources (eg satellite and terrestrial tuner cards).

I've also seen different formats for what looks like the essentially same information.
In viewtopic.php?f=36&t=2542 it looks like this:

Code: Select all

<station id='79686'>
<callSign>KZDNLD</callSign>
<name>KZDNLD (KZDN-LD)</name>
<affiliate>Low Power</affiliate>
<fccChannelNumber>31</fccChannelNumber>
Third question: Why the difference?

The next issue is generating the <source>.xmltv files which list the XMLTVIDs to be grabbed.

They look like this:

Code: Select all

channel-id-format=mythtv
previously-shown-format=date
username=xxxx
password=yyyy
mode=channels
channels=GBR-0001317-DEFAULT
channel=30644
channel!24337
I am assuming that the 'channels=' (plural) line defines region and source.

Now from the database we can work out which channels in that source have an XMLTVID set, are visible and are not EIT.
They clearly need program data grabbing.

Fourth question:
Is it sufficient to only include those required in the source files ('with channel=' lines) or
do we need to specifically exclude those not required (eg channel!1234)? If we need to include
the channel! ones then I have some interesting questions if the list of XMLTVIDs in the source
file do not match those on the database!

I'd really appreciate any insight (or correction of my understanding) of these issues.

Regards
Phil
User avatar
paulh
Developer
Posts: 909
Joined: Thu Feb 06, 2014 6:09 pm
Great Britain

Re: Schedules Direct - information requested

Post by paulh »

Just to complicate things further there is also another SD grabber that most of the devs use that also uses the JSON API called tv_grab_zz_sdjson_sqlite.

That one only uses the <source>.xmltv config files to point to the sqlite database and choose a lineup everything else is stored in the Sqlite DB.
MikeB2013
Senior
Posts: 519
Joined: Mon Jul 25, 2016 4:16 pm
Great Britain

Re: Schedules Direct - information requested

Post by MikeB2013 »

Some Comments and answers based on my UK experience.

Schedules Direct recently and suddenly (a few months ago) revamped UK Lineups and sorted out a lot of the naming issues e.g. Channel 4 (plus 1 hour) is now Channel 4 +1, which helps with the mythfilldatabase built-in auto mapping (which basically takes the name from the Schedules Direct generated xml file, lower cases it and removes spaces) and then tries to match callsign in mythconverg channel table. Unfortunately there are still differences between transmitted callsign and channel name within the xml file, e.g. transmitted callsign "Pick" Schedules Direct name is "Pick TV", so mythfilldatabase auto mapping does not work.

There is also the difference for the odd channel of transmission hours e.g. Freeview ITV3+1 is 18:00 - 06:00 Freesat is 24 hours, Schedules Direct cater for this with a different id and include Freeview in the name.

The worst issue I have is matching Schedules Direct to ITV on Freesat, transmitted callsign is just ITV or ITV HD or ITV+1 matching this requires knowledge of serviceid, although the difference in broadcast is regional news programs.

Second question:

Yes, you do need different files for each Videosource, one each for Freeview and Freesat. I have pcie tuners for Freeview and Freesat, so I need a configuration file for each. I also have network based tuners (VBOX) which also need their own VideoSource, so another configuration file for each type of transmission handled by each VBOX.

If an xmltvid is present in the mythconverg channel table, useonairguide must be set to 0, otherwise if EIT is enabled for that Videosource it will overwrite any data from Schedules Direct.

Fourth question:

There is another form of configuration file for Schedules Direct which I use and has lineups (which just grabs data for all channels in the enabled lineups) instead of channels e.g.

Code: Select all

cache=/home/mike/.xmltv/tv_grab_zz_sdjson.cache
channel-id-format=mythtv
previously-shown-format=date
username=xxxxxxxxx
password=yyyyyyyyy
mode=lineup
lineup!GBR-1000073-DEFAULT
lineup!GBR-1000076-DEFAULT
lineup!GBR-1000209-DEFAULT
lineup=GBR-1000450-DEFAULT
There are no channel(s) lines at all.

I ran a quick test using tv_grab_zz_sdjson on a configuration file without channel!<nnnnn> lines and it still works producing data only for those channel specified with =, so you could omit channel!<nnnn> lines from any file you generate.

Mike
PhilB
Senior
Posts: 403
Joined: Sun May 11, 2014 6:23 pm
Great Britain

Re: Schedules Direct - information requested

Post by PhilB »

Thanks both. Very helpful.
Phil
Post Reply