Version 1 (modified by max, 6 years ago)

--

What the frick are XMLTV IDs?

Many people misunderstand XMLTV IDs, and they can be a major source of confusion and dismay when trying to set up TV channels. However, it's a simple concept, and taking a minute to understand it can save time when configuring.

An XMLTV ID is simply a unique label for a TV channel. It's customary for this name to resemble an URL (e.g. "abc.free.au"), but it can be anything. All that's important is that each channel's ID be unique and known to both Shepherd and MythTV.

This is because Shepherd doesn't say, "I have guide data for ABC TV," but rather, "I have guide data for abc.free.au." MythTV then checks this against the XMLTV IDs it knows about. Hopefully it finds one: that is, you configured it (in mythtv-setup) to have a channel with an XMLTV ID of "abc.free.au", plus other data: e.g. a name of "ABC TV Melbourne," channel number 2, frequency 753.5 MHz, etc. If so, MythTV fills this channel with guide data.

What can go wrong

The most common problem is ending up with MythTV having one set of XMLTV IDs for your channels, and Shepherd another. (E.g. MythTV might call ABC TV "abc.digital.melbourne" and Shepherd might call it "abc.free.au".) When MythTV reads in guide data from Shepherd, it sees a bunch of unknown XMLTV IDs and thinks they're new channels. It then automatically creates these in its database. But of course it has no idea what frequency the channels are, so now the user has a double list: channels with guide data but no audio/vision, and channels with audio/vision but no guide data.

(The solution here is to delete half and modify the remainder so they match. You could do it either way, but simplest is probably to delete the new, frequency-less channels in mythtv-setup, re-configure Shepherd to use the same XMLTV IDs as MythTV, and run it again.)

The Simplest Way from A to B

I believe the simplest method of setting all this up from scratch is:

  1. Run mythtv-setup and go into the Channel Editor.
  2. Use the Channel Scanner to set up your channels. (You can also delete or rename the detected channels if you wish.) Make a note of the XMLTV ID assigned to each channel.
  3. Install/configure Shepherd. Assign each channel the XMLTV ID it has in MythTV.

Choosing XMLTV IDs

Both Shepherd and MythTV let you enter an XMLTV IDs for each channel. That is, you can set the XMLTV IDs in MythTV to match the ones you set in Shepherd, or vice versa. Or you make up your own list of XMLTV IDs and edit channels in both MythTV and Shepherd to suit. All that matters is each XMLTV ID be unique and known to both programs.

Note that during configuration, Shepherd will try to read your MythTV database for existing channels and suggest XMLTV IDs to match. Also, unless mythfilldatabase is run with the --update option, MythTV will automatically create new channels for unknown XMLTV IDs (although without any frequency information, or audio/vision, as mentioned above).

What are my XMLTV IDs?

Shepherd stores its XMLTV IDs in ~/.shepherd/channels.conf. MythTV's list can be viewed from within mythtv-setup -> Channel Editor.