XMLTV parsing channel id and display-name

As the guide data provided for Denmark is fairly lacking, I am using my own XMLTV file sourced from honeybee.it. Plex generally parses my XMLTV file fine. The only issue that I have is that it uses not only the attribute from the XMLTV-file as channel name but also the .

In other words in Plex web as well as in the tvOS and iOS apps channels are named as “ “ (e.g. MTV is displayed as “1810.honeybee.it MTV (DK)”, where “1810.honeybee.it” is the channel id set in the XMLTV-file and “MTV (DK)” is the display-name set in the XMLTV-file).

Is this by design or is it a (known) bug?

Bad XMLTV file, IMHO

Try this:

github.com/ukdtom/epg-dk.bundle

I don’t think that there is a problem with the XMLTV file. I have looked it through and can’t find any invalid syntax, but for good measures I will try to validate the file online and post back the result.

I have been using your epg-bundle and while it works really really well, the lack of episode numbering of shows makes recording really crappy. I do understand that this is down to the information available on the page you are scraping but it let me to search for alternatives…

Yep, my “provider” sucks :wink:

But you could for a start compare a generated xmltv file from my tool with one you have, to pinpoint the difference

Ok, tried to do a validation of the XMLTV file and validates fine (same does your’s by the way). Also manually compared the two files. There are a couple of minor differences:

  • in first line declaring xml version and encoding you use single quotes and my xml uses double quotes. As per the XMLTV documentation it seems double quotes is correct, and either way neither use throws any validation errors.
  • In second line there seem to be a syntax error in my xml file as it says “tv PUBLIC “SYSTEM”” rather than “tv SYSTEM”. Have edited this manually, but this makes no change
  • in third line <tv … you define a lot more info, whereas my xml file only define generator.info-name. But the un-defined items are not mandatory.
  • in the definition of channel (which one should think was the key item) there are a few differences as well:
    • my xml has channel ID’s with full stop in them whereas you just use a number. However the full stops are in line with the XMLTV format definition so should be ok
    • In the display name tag language is defined (lang=“da”). Again this is also in line with the XMLTV format definition so this should also be ok.
    • Finally last attribute defined for each channel is … . Again this is allowed according to the XMLTV definition.

So in short I am no closer to an answer. Any ideas?

Hard to get ideas, when blindfolded :wink:

Attaching your xmltv file would help

Of course. Sorry should have done that from the beginning. Attached here.

A guess would be, that the channel id on the channel node is not a numeric value. Dunno if PMS is requiring a numeric value.

You could try to replace .honeybee.it"> with "> and do an import again. I’ve included some of the XML node tag in the replace text, to ensure only the channel id text is replaced. You could also replace by regex …

Plex always list the channels as: <channelid> <display-name> … this is by design (i guess).

@mm98 said:
A guess would be, that the channel id on the channel node is not a numeric value. Dunno if PMS is requiring a numeric value.

Could be, but hard to verify (would basically require a re-write of the entire XMLTV file and reloading in Plex. However it seems strange - it matches programs against channels just fine, records just fine and everything. The only issue is that it includes this additional text in the channel name in the GUI.

edit: You are right, the edit needed can actually be performed that easy. I will try to update the EPG with a modified version of the XML file and see if it changes anything.

What @mm98 said.

In PMS, the display name is AFAIK, a concatenate of ChannelId and DisplayName, and as such, what you see is WAD (Working as designed)

Can confirm that changing channel id’s to pure numbering values makes no difference other than decreasing the amount of additional text in front of the actual channel name.

Again back to square one. Am I really the only person using a third party XMLTV file that see this behavior?

@dane22 said:
What @mm98 said.

In PMS, the display name is AFAIK, a concatenate of ChannelId and DisplayName, and as such, what you see is WAD (Working as designed)

Ok, if that is the case then this answers my question, i.e. that it is by design and thus works as intended. In that case I guess I should submit a request to change or make this optional. IMHO it makes no sense to show the channel id, when there is an attribute (display-name) that is intended to be what is shown.

Anybody that can answer definitive that this is the way PMS is designed?

It does make sense, IMHO, since some providers, like YouSee, have the same display name for multiple channels!
(All though the only have one, namely Ch. 65 and 66)

github.com/ukdtom/epg-dk.bundle/blob/master/YouSee_ChannelList_20161202.txt

Not sure I agree. I appreciate that YouSee being lazy just call several channels “Lokalt Program” (guessing to cover more regions with the same setup). But that does not mean that those channels are actually called the same thing if tuning into them.

IMHO the display name that the XMLTV file defines should be the actual name of the channel rather than some placeholder defined by YouSee (or other providers). Also as I read the DTD for XMLTV the channel id attribute should be a DNS-like entry and if one wants to show a channel number it should be included in the display name followed by a space and then the canonical name of the channel.

I just tried to use a custom xmltv provided by my tvheadend setup and seeing the channel id before the channel name is very annoying and make no sense to me. tvheadend ids are 32 hexa chars so i just can’t see anything in the program grid. This behavior should be optionnal.

I am also looking to resolve this issue
If there was an easy way for TVheadend to export with the api that would be great.
This site claims these api’s work, but they do no not for me only the. - :9981/xmltv/channels

https://github.com/dave-p/TVH-API-docs/wiki

xmltv

Outputs the EPG in XML format, filtered in various ways.

curl http://192.168.0.1:9981/xmltv/channelid/<channelid> curl http://192.168.0.1:9981/xmltv/channelnumber/
curl http://192.168.0.1:9981/xmltv/channelname/<channelname> curl http://192.168.0.1:9981/xmltv/channel/
curl http://192.168.0.1:9981/xmltv/tagid/<tagid> curl http://192.168.0.1:9981/xmltv/tagname/
$ curl http://192.168.0.1:9981/xmltv/tag/

there is intresting stuff here with the new api but is in json. the api also does not export the full epg inf to even do a script convert to xml

take a look at it may you can find better info.

Solved–

Just a little update,
I ended up using Xteve docker as a proxy for tvheadend’s m3u to solve the channel numbering.
This also adds some extra XML options to the mix. very little overhead.

I know this is an old thread, but you can use an LCN tag in the channel description to ensure Plex shows and maps the channels correctly.

An example from my xml file:

<channel id="32.tvguide.com">
     <display-name>SBS</display-name>
     <lcn>32</lcn>
     <icon src="http://imageaddress/image.png" />
</channel>
1 Like