XMLTV (foreign) categories not used

Server Version#: 1.18.2.2031 (Shield TV 2017)
Since I am not very happy with the EPG provided by Plex for Germany to say the least, I started building my own xmltv guide using webgrabplus. I had some success with it and I am overall very pleased with this solution.

There are some issue still remaining:

  • Plex does not respect the categories I set for news and sports. I added the German words “Sport” and “Nachrichten” to the respective category, which are generated in the xmltv file, but still all I get is movies, shows and episodes. The category in the xmltv file carries the language code “de” obviously.
  • How is the “new” indicator triggered? Is it any airing I have not “seen”? Since I set up the xmltv guide, each and every airing with episode information is marked as “new”, regardless how old that episode is. There is no field in the xmltv file, so this must origin from Plex itself. Would be nice if someone could explain how this works.

A lot of attention to XML guide obviously. A pitty since one has to fiddle with this since the official Plex guide is not usable in practice.
Maybe I should have posted this in a different area, this probably also not limited to the shield as a server.
@sa2000: sorry to ping you, but you are the only one here I know who deals with this DVR mess. Anyone dealing with the xmltv implementation?

@ChuckPa may I ping you again, as I really need assitance here, xmltv support in Plex is not really well documented as it seems.
It is not only related to the shield as a server, since I witness the same behaviour now on my Unraid server.

Ich werde nachfragen wie es tun soll und was wuerde geschrieben. :slight_smile:

http://wiki.xmltv.org/index.php/XMLTVFormat

Vielen Dank Chuck, dass du mir wieder helfen möchtest.

You are working on your German? :wink:

I will try to give more detailed information. I get my xmltv file from webgrabplus, which grabs the information from a German online TV schedule (tvdigital.de). I have the “enhanced guide” enabled in the DVR settings, so I enrich the xmltv EPG with more info. The behaviour is identical when this is disabled.

1. All Episodes shown as “New”:

As seen in this screen, each and every episodes which are aired are shown with the “new” indicator, regardless how old they are:

The respective xmltv entries look like this, this is an episode of “Sn@tch” (why is it a bad word? Substituted the a with @) S2E4 from Sony AXN in the middle of the screen:

  <programme start="20200115152500 +0100" stop="20200115161500 +0100" channel="Sony AXN">
    <title lang="de">Sn@tch</title>
    <sub-title lang="de">Der Schwinger</sub-title>
    <desc lang="de">Im Mittelpunkt der lose an den gleichnamigen Film von Guy Ritchie angelehnten Serie, steht eine Gruppe von Kleinganoven aus Großbritannien, die zufällig in den Besitz eines Lkws voller Gold gelangt.(n)</desc>
    <credits>
      <director>Tom Dey</director>
      <actor>Rupert Grint</actor>
      <actor>Dougray Scott</actor>
      <actor>Ed Westwick</actor>
      <actor>Luke Pasqualino</actor>
      <actor>Marc Warren</actor>
      <actor>Lucien Laviscount</actor>
      <actor>Phoebe Dynevor</actor>
      <actor>Juliet Aubrey</actor>
      <writer>Grant Levy</writer>
      <writer>Dominik Rothbard</writer>
      <composer>Reza Safinia</composer>
    </credits>
    <date>2018</date>
    <category lang="de">Serie</category>
    <category lang="de">Comedyserie</category>
    <icon src="https://tvdigitalepg.images.dvbdata.com/7778351/7778351_478x268.jpg" />
    <country lang="de">USA/GB</country>
    <episode-num system="xmltv_ns">1.3.</episode-num>
  </programme>

So there is no “new” information whatsoever from the xmltv file itself, so this has to come from Plex. My question is, why?

Another example is “Ein Engel auf Erden” S4E4 at Sat 1 Gold. This one is really old and was probably aired a gazillion times before.

  <programme start="20200115103500 +0100" stop="20200115113000 +0100" channel="Sat.1 Gold">
    <title lang="de">Ein Engel auf Erden</title>
    <sub-title lang="de">Feine Gesellschaft</sub-title>
    <desc lang="de">Jonathan Smith wird von seinem Boss, keinem geringeren als Gott, zur Erde zurückgeschickt. Er soll den Menschen die Liebe nahebringen und ihnen bei ihren Problemen helfen. Dabei kann er seine magischen Fähigkeiten einsetzen. Der ehemalige Polizist und trockene Alkoholiker Marc Gordon steht ihm bei seiner Mission zur Seite: Jonathan und Marc sollen in einem Reichen-Viertel ein leer stehendes Haus verkaufen. Als eine afroamerikanische Familie dort einziehen will, machen die Nachbarn einen Aufstand ..(n)</desc>
    <credits>
      <director>Michael Landon</director>
      <actor>Michael Landon</actor>
      <actor>Victor French</actor>
      <actor>Miriam Colon</actor>
      <actor>Gabriel Damon</actor>
      <actor>Janice Kent</actor>
      <actor>John Lawlor</actor>
      <actor>David Spielberg</actor>
      <actor>Richard Bergman</actor>
      <writer>Vince R. Gutierrez</writer>
      <composer>David Rose</composer>
    </credits>
    <date>1987</date>
    <category lang="de">Serie</category>
    <category lang="de">Familienserie</category>
    <icon src="https://ersatzbild.images.dvbdata.com/v2/478x268/289_478x268.jpg" />
    <country lang="de">USA</country>
    <episode-num system="xmltv_ns">3.3.</episode-num>
  </programme>

Again, follows the same style, nothing indicating “new”.

2. Custom Category Names:

My custom categories look like this:

For the sake of completeness I also tried it with a space after the comma, same result.

Still, my upcoming news looks like this:

The Sports category I don’t have at all.

An example for a news entry would be this:

  <programme start="20200115190000 +0100" stop="20200115192000 +0100" channel="3sat">
    <title lang="de">heute</title>
    <desc lang="de">Die Nachrichtensendung des ZDF. Aktuelle, informative Beiträge und Live-Schaltgespräche zu den Topthemen des Tages aus Politik, Wirtschaft, Justiz, Wissenschaft und Sport liefert die ZDF-Nachrichtensendung.(n)</desc>
    <credits>
      <presenter>Barbara Hahlweg</presenter>
    </credits>
    <date>2020</date>
    <category lang="de">Information</category>
    <category lang="de">Nachrichten</category>
    <icon src="https://tvdigitalepg.images.dvbdata.com/7369266/7369266_478x268.jpg" />
    <country lang="de">D</country>
  </programme>

So either the category is ignored since it shows lang=de or the custom category filter is not applied. That Barbie and Super Toy Club that are shown as News have the following entries:

  <programme start="20200119150000 +0100" stop="20200119151500 +0100" channel="Super RTL">
    <title lang="de">Barbie erklärt's</title>
    <category lang="de">Information</category>
    <category lang="de">Reportagereihe</category>
  </programme>
  <programme start="20200118151500 +0100" stop="20200118154000 +0100" channel="TOGGO plus">
    <title lang="de">Super Toy Club</title>
    <desc lang="de">Diesmal treten `Die Montis' aus München gegen die `Music Boys' aus Aspelt gegeneinander an. Das Team, das bei den Spielen `Dr. Bibber', `Balla Balla', `Labyrinthia' und `Kristallica' die meisten Punkte sammelt, darf am Ende der Show Spiele aussuchen.</desc>
    <credits>
      <presenter>Florian Ambrosius</presenter>
    </credits>
    <date>2018</date>
    <category lang="de">Nachrichten/Info/Dokumentation</category>
    <icon src="http://kbde.tmsimg.com/assets/g8_h12_aa.jpg" />
    <country lang="de">DE</country>
    <episode-num system="onscreen">S2 E7/24</episode-num>
    <episode-num system="xmltv_ns">1.6/24.</episode-num>
  </programme>

They seem to have the category “Info”/“Information” in common, but there a plenty of other airings with that category, so I have no clue why Plex selected these two as “news”.

And just as proof that there are entries that feature the category “Sport”:

  <programme start="20200119034000 +0100" stop="20200119050000 +0100" channel="3sat">
    <title lang="de">Das aktuelle Sportstudio</title>
    <desc lang="de">Jeden Samstag gibt es in der legendären Sportsendung des ZDF Berichte über die Fußball-Bundesliga, interessante Gäste aus allen Sportarten und das Torwandschießen.</desc>
    <credits>
      <presenter>Sven Voss</presenter>
    </credits>
    <date>2020</date>
    <category lang="de">Sport</category>
    <category lang="de">Sportmagazin</category>
    <icon src="https://tvdigitalepg.images.dvbdata.com/6673329/6673329_478x268.jpg" />
    <country lang="de">D</country>
  </programme>

So I hope this makes things a bit clearer, the xmltv guide/style is in principle known to me.

Just to add to the conversation, I’m having the exact same issue: Everything that doesn’t have an episode number is identified as “Movies”, Sports and News alternate categories are being ignored.

I guess we could look at it in this way: Plex is seeing everything it imports from a XMLTV file as “Movies” by default. Then it sees “Series” as things with a Season/Episode number in the xmltv_ns format. Then it defines what is “Sports” and what is “News” by the category (which is why those are the only two things you can add to the DVR Guide. However, since its ignoring those alternate categories, everything that doesn’t have an episode (or an original airing date) is identified as a movie.

Like its been said before, since XMLTV importing is such a important feature for people on different regions, A better understanding of how Plex parse those would benefit people creating those XML files manually (most of us that use the feature, I would imagine) greatly. Hopefully more information surfaces.

@ChuckPa anything to add on this?

Oh, right. About things being identified as “new”.
WebGrab++ adds (n) to the end of the description tag. That is a flag that means that content is New. Since WebGrab++ always re-writes a fresh new Guide file whenever it scrapes a website (unless you set it to iterate on an existing Guide), it always sets everything as new.

According to documentation, you can change the “mode” tag on the configuration file (http://webgrabplus.com/documentation/configuration/webgrabconfigxml) to remove markings. I don’t know if that helps, but that’s what WebGrab++ uses to mark “new” shows or you can iterate on an existing Guide File, which I think will remove/update the (n) flagging

On the other hand, on my setup, the NEW notification doesn’t show up on plex and the (n) is just part of the description, so YMMV:

1 Like

Uh nice info on the “new” indicator! So setting the nomark flag probably removes the new flag completely? Still, I can also ignore it altogether, right? :wink: I run webgrabplus in smart mode.

Seems as this works differently from what I have expected and I still don’t get which shows receive that flag. Do you?

Ok, so I made some progress. In a strange way:

By editing my .XML file, here are the observations I made. These could be incorrect or incomplete, as I literally don’t have any more data to run through PLEX. I might make some up in a different time, but a more comprehensive way of understanding how PLEX parses data would be good to have.

  • EVERYTHING that doesn’t have a “episode-num” tag will be identified as a Movie, no matter the categories.
  • EVERYTHING that does have a “episode-num” tag, be it a “original-air-date” type or a “xmltv_ns” type will be identified as a series AND THEN will be categorized under News or Sports following custom categories under DVR settings.

I came to this conclusion by configuring a XMLTV parser program that would scrape a website and fill in Season/Episode information when available, will add a “original-air-date” with a fixed year (2019, in this case) when no episode information is available (which will add an “episode-num” tag to Movies) and, after that, will delete any “episode-num” tag on entries that are identified either as “Movie” of “Cinema” in the categories (that’s how movies are categorized in my country, at least with this sample size).

In this scenario, only entries with no “episode-num” tag are listed under Movies, only “News” and “Sports” (that follow the custom categories on the DVR setting, including different languages) show up on those categories and EVERYTHING that doesn’t fall in either of those will show up on “Shows”.

I only noticed two downsides at this point:

Multiple screenings of a show that you don’t have enough information about (lets say you know “Miami Vice” is broadcasted every day at 15:00) will only show once on the “show” or “episodes” view (because the only information that Plex has to use is the “original-air-date” of 2019 for all those entries). It only shows the next broadcast. Since this apparently gets added on to the DVR schedule as a text match to “Miami Vice” (I didn’t test this yet), I imagine this is a non-issue on usability, but it doesn’t look good…

Everything (except “Movies”, as they’re not treated as “Shows”) is now listed as “new”, as you were experiencing before. I theorize (and this is just a theory, I didn’t test it and I don’t think I care to) that Plex identifies everything as new unless it has a Broadcast Date that matches a previous broadcast date on the cached EPG (let’s say an episode of a TV show that aired on Monday is being re-broadcasted on Thursday and the “original-air-date” points to the existing Monday entry) as I have identically named weekly TV Shows with the same “original-air-date” of “2019” and both are flagged as “new”.

tl;dr: The way Plex decides what is a Movie and what is a TV Show and, off the TV Show “basket”, what is Sports and what is News is less than ideal because it removes that choice from the user, specially since “episode number” and “original broadcast” are not even on the OTA EPG spec, as far as I am aware, while alluding that the user can change those settings. The work around I found is to trick Plex into identifying things the way you want by painfully researching what tags it uses to do so.

My proposed solution: Just use the categories to identify the 4 major types and let us add aliases to them. If a show has multiple categories, just list the same show on all categories that are matched. Read and use the extra information if it’s there, but if it’s not, no big deal.

2 Likes

I’ll add these here so I don’t forget and more people can acquire this knowledge. They’re things I noticed about different XMLTV tags while trying to figure out how things are parsed:

  • “sub-title”
    • The XMLTV tag “sub-title” is only used when PLEX identifies the entry as a TV Show. It will then apply the sub-title to either the “Browse” icon of that unique episode or list it under the “episodes” list of a show “page”. Doesn’t seem that it’s ever used when a entry is identified as a Movie.
  • “video/quality”
    • PLEX will classify a show as HD or SD based off the XMLTV “video”/“quality” tag, even if the tunned channels report being HD or SD.
  • “ratings”
    • PLEX will display whatever text is under the ratings tag with a special text flair but will ignore the image of said rating if provided.

Great findings and this explains most of my issues reported above.
Still, in my opinion Plex has to do something about the categories. So since @BigWheel already read your detailed post, maybe he can pass on some of the info to the Devs? Keep in mind that a lot of Plex DVR users are forced to use xmltv files.

Hi guys. I’m the developer of NZXMLTV, so I’ve had a bit of experience playing with the XMLTV tags in Plex.

Essentially, here is a list of XMLTV tags that are used by Plex (as far as I can tell):

  • Title
  • Sub-Title - Used only for TV shows. Generally an episode name or something.
  • Desc
  • Date - Generally used for movie dates (not used for TV shows as far I can tell). Generally I just use a year (e.g. <date>2019</date>)
  • Category - Used for both TV shows and movies, however as you guys have discovered, the News & Sports classifications only applies to TV shows.
  • Icon - Used for posters. Some Plex clients used to crash when this was missing, but that was over a year ago, so not sure whether it’s still true.
  • Episode-Num - Plex takes in two main types of systems here, xmltv_ns and original-air-date. The first one is used for the normal Season XX Episode XX notation, with ‘original-air-date’ being for a DD/MM/YYYY notation. This seems to be in the format of 2020-02-28 23:15:00. If your data provider doesn’t supply this, probably just use the date that show is aired (and if you can store that somewhere). I believe Plex may also read episode numbers with the onscreen system, assuming they’re in the format SXXEXX, however I’d stick to xmltv_ns. Additionally, there is some like thetvdb.com that (may) be used for the enhanced guide option (however again, I’m not certain about this).
  • Video - Only used for the HD categorisation.
  • Rating - Used for displaying content ratings.
  • Credits - Both the name and the role are used (however only some roles are used, like writer or director).
  • Sport - Custom Plex tag that is used to set what sport is being played. Only used for sports shows (theoretically for sorting them, but that seems to be broken).
  • Team - Used for what teams are playing in a sports game, so that all games with a specific team can be recorded.
  • Country - Used for filtering shows.
  • Previously-Shown - This is where the issue around ‘new’ tags comes in. Plex assumes all shows are ‘new’ unless the previously-shown tag is added.

Tags that I’m not sure about:

  • Keyword - Doesn’t seem to be used at all.
  • Language - Not sure if this is used.
  • Original Language - Also not sure if this is used.
  • Length - Doesn’t seem this is used.
  • URL - Not used.
  • Audio - Doesn’t seem to be used.
  • Premiere - Doesn’t seem to be used.
  • Last-Chance - Doesn’t seem to be used.
  • New - I don’t think this is used, rather Plex relies on ‘previously-shown’.
  • Subtitle - (Not to be confused with sub-title), but this doesn’t seem to be used.
  • Star-Rating - Doesn’t seem to be used.
  • Review - Not sure if this is used or not.
2 Likes

Found something else.

If the episode tag formatted as xmltv_ns only has a year in it (2020…), the entry gets identified as a movie instead of a TV show.

Out the window goes my idea of properly flagging TV shows with no episode information. Oh well.

This post was immensely helpful, Shea. Thank you for your help.

Hey Coxeroni. I saw you posted on another thread about “we” having a international category issues.

I thought the issues were fixed? I noticed that Plex only cares about categories AFTER identifying an entry as being a TV Show, which only happens if it sees episode information in the xmltv_ns format.

After it identified it as a show, it will use categories accordingly, group them together even with different languages and understand what you put as a category in the category field for sports and news. It works here and I can provide screenshots and go more in detail if necessary.

Unless there’s a different issue I’m not understanding from the messages?

This definitely doesn’t work for me. I will investigate it later in more detail. Or I don’t have the combination of entries as you said.

So, i’ve been generating my own guide.xml off WebGrab++. I edited the scraper .ini to generate things as I need them, and, like I said before, if I identify ANYTHING THAT’S NOT A MOVIE as a TV Show (news swhos, tv series, informercial programs), plex then identifies those as TV Show, lists them as TV Shows and uses the categories (whatever they are) as identifiers for them in the “sort by category” in the browse menu:

https://imgur.com/Hgw9Xiv

This menu will not populate if Plex doesn’t see any “TV Shows” on the XML.

If this menu is populated, it will then understand what you put on DVR Settings as alternate Categories for the shows you want:

https://imgur.com/j6DjX6U
https://imgur.com/a/or72l6E
https://imgur.com/a/G84AtcG

In these pictures, I added the tag “Informativo” as an alias for “News”, which then Plex identifies as a news (by the “News” filter) and the entry category tags on the XML generated by WebGrab++ are only “Informativo” and “Jornalismo”, meaning that the aliases do work (as long as the show is identified as a “TV Show” by plex).

Edit: Here is the XML entry for this particular show:

  <programme start="20200313115000 -0300" stop="20200313133000 -0300" channel="8.1">
    <title lang="pt">Balanço Geral - Local</title>
    <sub-title lang="pt">Balanço Geral - Local</sub-title>
    <desc lang="pt">O programa, que transita entre o jornalismo e o entretenimento, mostra reportagens exclusivas, denúncias, prestação de serviço e assuntos que mexem com o dia a dia da comunidade - como problemas nos bairros, segurança e saúde pública.</desc>
    <category lang="pt">Jornalismo</category>
    <category lang="pt">Informativo</category>
    <episode-num system="original-air-date">2020-03-13 11:50:00</episode-num>
    <video>
      <aspect>16:9</aspect>
      <quality>HDTV</quality>
    </video>
    <previously-shown />
  </programme>

And, again, the only way that you can make plex understand that an entry on a XML file is a “TV Show” as opposed as a “Movie” is by adding an <episode-num> tag, but it has to be in either the “xmltv_ns” or the “original-air-date” system (there are others but plex doesn’t understand them). I personally gave things that are not sequential (there’s no season or episode information of a daily news show, for instance) the original-air-date system because i think it makes them look better on the Plex interface (otherwise It shows a blank space where episode information is needed). The downside is that these original air dates need to be unique for every entry, otherwise they all get lumped together as a single show.

And also, since they’re all properly identified, they will show on Plex’s “What’s On” page with “Sports on Later”, “Movies on Later” and “News on Later”

… and all of this would be fixed if Plex devs just gave us simple unified DVR library section for all DVR recordings and used categories as filters. Job done.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.