XMLTV & Categories

Hi,

I’m using XMLTV generated with WebGrabPlus because the data from Gracenote is allmost useless in Switzerland (many missing channels/events).

Unfotunately all events going to the category Film when I import the xmltv epg data.

I think its because I have german categories in my xml:

<category lang="de">Nachrichten</category>

In the DVR settings there is an option to adjust the categories for News and Sports.

I tried to add “Nachrichten” in News but nothing changes. Any ideas why it’s not working?

And is there an option to adjust the other categories aswell (Film and Series)?

For news you can try this <category>News</category>.
For movie you can try this <category>movie</category>
For series you can try this <category>series</category>
For sports you can try this <category>sports</category>

If you only use these few categories you never have the sub categories shown in Plex.

To modify it directly in WebGrabPlus you could use a lot of modifys in your ini for all your categories:

category.modify {replace(type=regex)|"^Spielfilm$"|movie}
category.modify {replace(type=regex)|"^Nachrichten$"|News}
...

More categories with sub categories:

    <category>Action sports</category>
    <category>Action</category>
    <category>Adults only</category>
    <category>Adventure</category>
    <category>Aerobics</category>
    <category>Animals</category>
    <category>Animated</category>
    <category>Anime</category>
    <category>Anthology</category>
    <category>Archery</category>
    <category>Art</category>
    <category>Arts/crafts</category>
    <category>Auction</category>
    <category>Auto racing</category>
    <category>Auto</category>
    <category>Aviation</category>
    <category>Awards</category>
    <category>Ballet</category>
    <category>Baseball</category>
    <category>Basketball</category>
    <category>Bicycle racing</category>
    <category>Bicycle</category>
    <category>Billiards</category>
    <category>Biography</category>
    <category>Boat racing</category>
    <category>Boat</category>
    <category>Bowling</category>
    <category>Boxing</category>
    <category>Bus./financial</category>
    <category>Children</category>
    <category>Collectibles</category>
    <category>Comedy drama</category>
    <category>Comedy</category>
    <category>Community</category>
    <category>Computers</category>
    <category>Consumer</category>
    <category>Cooking</category>
    <category>Crime drama</category>
    <category>Crime</category>
    <category>Dance</category>
    <category>Dark comedy</category>
    <category>Debate</category>
    <category>Diving</category>
    <category>Docudrama</category>
    <category>Documentary</category>
    <category>Drama</category>
    <category>Educational</category>
    <category>Entertainment</category>
    <category>Environment</category>
    <category>Equestrian</category>
    <category>Erotic</category>
    <category>Event</category>
    <category>Fantasy</category>
    <category>Fashion</category>
    <category>Feature Film</category>
    <category>Fishing</category>
    <category>Football</category>
    <category>Game show</category>
    <category>Gaming</category>
    <category>Gay/lesbian</category>
    <category>Golf</category>
    <category>Handball</category>
    <category>Health</category>
    <category>Historical drama</category>
    <category>History</category>
    <category>Hockey</category>
    <category>Holiday</category>
    <category>Home improvement</category>
    <category>Horror</category>
    <category>Horse</category>
    <category>House/garden</category>
    <category>How-to</category>
    <category>Interview</category>
    <category>Intl soccer</category>
    <category>Law</category>
    <category>Martial arts</category>
    <category>Medical</category>
    <category>Military</category>
    <category>Miniseries</category>
    <category>Mixed martial arts</category>
    <category>Motorcycle racing</category>
    <category>Motorcycle</category>
    <category>Motorsports</category>
    <category>Mountain biking</category>
    <category>Music</category>
    <category>Musical comedy</category>
    <category>Musical</category>
    <category>Mystery</category>
    <category>Nature</category>
    <category>News</category>
    <category>Newsmagazine</category>
    <category>Olympics</category>
    <category>Opera</category>
    <category>Outdoors</category>
    <category>Parade</category>
    <category>Paranormal</category>
    <category>Parenting</category>
    <category>Performing arts</category>
    <category>Playoff sports</category>
    <category>Poker</category>
    <category>Politics</category>
    <category>Pro wrestling</category>
    <category>Public affairs</category>
    <category>Reality</category>
    <category>Religious</category>
    <category>Rodeo</category>
    <category>Roller derby</category>
    <category>Romance</category>
    <category>Romantic comedy</category>
    <category>Rugby</category>
    <category>Running</category>
    <category>Sailing</category>
    <category>Science fiction</category>
    <category>Science</category>
    <category>Self improvement</category>
    <category>Series</category>
    <category>Shooting</category>
    <category>Shopping</category>
    <category>Short Film</category>
    <category>Sitcom</category>
    <category>Skiing</category>
    <category>Snooker</category>
    <category>Soap</category>
    <category>Soccer</category>
    <category>Special</category>
    <category>Sports event</category>
    <category>Sports non-event</category>
    <category>Sports talk</category>
    <category>Standup</category>
    <category>Surfing</category>
    <category>Suspense</category>
    <category>TV Movie</category>
    <category>Talk</category>
    <category>Technology</category>
    <category>Tennis</category>
    <category>Theater</category>
    <category>Thriller</category>
    <category>Track/field</category>
    <category>Travel</category>
    <category>Triathlon</category>
    <category>Variety</category>
    <category>Volleyball</category>
    <category>War</category>
    <category>Watersports</category>
    <category>Weather</category>
    <category>Western</category>
    <category>Wrestling</category>
    <category>Yacht racing</category>
    <category>movie</category>
    <category>series</category>
    <category>sports</category>
    <category>tvshow</category>

Sounds good, thank you.

But a lot of work if I wish to replace all sub categories.

Maybe someone can share his mappings? :slight_smile:

Edit: I’ve tested it but it didn’t work.

e.g. when using tvmovie.de.ini

I’ve added the category.modify at the end like this:

category.modify {replace(type=regex)|"^Nachrichten$"|News}
category.modify {replace(type=regex)|"^[a-zA-Z]*serie$"|series}
category.modify {replace(type=regex)|"^Reportage$"|Documentary}
end_scope
*

Nothing changes, whats wrong?

I’ve managed to change the categories in WebGrabPlus.

But I still don’t get the categories in Plex, everything goes to movies.

My xml looks like this:

          <programme start="20170712200000 +0200" stop="20170712201500 +0200" channel="ARD ALPHA">
            <title lang="de">Tagesschau</title>
            <desc lang="de">Die beste Adresse um an tagesaktuelle Nachrichten und Information zu kommen. An 365 Tagen im Jahr rund um die Uhr aktualisiert bietet tagesschau.de die wichtigsten Nachrichten des Tages und zusätzliche Informationen in Text, Bild, Audio und Video, sowie umfassende Berichte und Hintergründe zu aktuellen Themen(n)</desc>
            <date>2017</date>
            <category lang="de">News</category>
            <icon src="http://funke.images.dvbdata.com/1056561/1056561_500x333.jpg" />
          </programme>
          <programme start="20170712201500 +0200" stop="20170712210000 +0200" channel="ARD ALPHA">
            <title lang="de">alpha-Forum: Karsten Schwanke</title>
            <desc lang="de">Karsten Schwanke ist Meteorologe, Journalist und Moderator. Er moderierte u. a. "Das Wetter im Ersten", "Das Wetter im ARD-Morgenmagazin", "Wetter vor acht" und verschiedene Wissenssendungen. "Ich glaube, es war ein typisches Phänomen in der DDR, dass sich die Leute sehr, sehr stark für die Geografie interessiert haben, und dabei vor allem für den Teil der Welt, in den man leider nicht konnte. Ich konnte schon alle Hauptstädte der Welt auswendig herbeten, ebenso die längsten Flüsse, die höchsten Berge usw. Ich habe wirklich schon als kleiner Junge Atlanten regelrecht aufgefressen. Geografie war jedenfalls eines meiner Lieblingsfächer in der Schule. In der elften Klasse brachte eines Tages unsere Geografielehrerin Satellitenfotos mit: damals noch auf schwarzweißem Fotopapier! Denn sie kannte irgendwie privat einen Meteorologen vom meteorologischen Dienst der DDR. Das waren sehr große, auf Fotopapier gedruckte Satellitenfotos: Sie waren nicht wie heute beschriftet und es gab keine Ländergrenzen darauf zu sehen. Man sah einfach nur irgendwelche Wolken und irgendwelche Küstenlinien. Es hat mich absolut gepackt, sofort das Raten anzufangen: 'Wo ist das denn?' Über diese Satellitenfotos bin ich eigentlich erst darauf gestoßen, mir zu sagen: 'Oh, da gibt es ja eine Wissenschaft, bei der man sich mit dem Wetter, also mit Meteorologie beschäftigen kann.' Das fand ich spannend. Und ich bin dann ja noch zu DDR-Zeiten zur Meteorologie gekommen: Es hat mich damals total begeistert, dass es in der Meteorologie selbst in den Zeiten des Kalten Krieges in den 80er Jahren keine Grenzen gab." Karsten Schwanke(n)</desc>
            <date>2014</date>
            <category lang="de">Talkshow</category>
            <icon src="http://images.klack.de/templates/klack/images/default_epg/default.jpg" />
          </programme>
          <programme start="20170712210000 +0200" stop="20170712214500 +0200" channel="ARD ALPHA">
            <title lang="de">Sylt</title>
            <title lang="xx">Sylt - Ausverkauf einer Luxusinsel</title>
            <desc lang="de">Neubauten gibt es fast nur noch durch Investoren, die in der Nähe der letzten halbwegs ruhigen Strandabschnitte Luxusherbergen errichten. Ganz normale Häuser werden zu Preisen verkauft, die den Bestlagen Münchens oder Düsseldorfs entsprechen. Immer mehr Sylter finden keine bezahlbare Wohnung mehr und müssen die Insel verlassen. Das hat dramatische soziale Folgen: Die Sylter werden zu Dienstleistern von reichen Zweitwohnungsbesitzern in den Dörfern, die früher ihre Heimat waren. Die Kirche, die Kneipe und das Vereinsleben gibt es nicht mehr. Sogar Bildung wird zum Luxusgut. Während staatliche Schulen auf der Insel geschlossen werden, und die Kinder der wenigen noch auf der Insel lebenden Sylter weite Schulwege in Kauf nehmen müssen, wird ein neues Luxusinternat gebaut. Diese Art von Bildung werden sich die Sylter kaum leisten können(n)</desc>
            <date>2012</date>
            <category lang="de">Documentary</category>
            <icon src="http://funke.images.dvbdata.com/4785925/4785925_500x333.jpg" />
          </programme>

I don’t uderstand why it’s not working… Is there any documentation about the xml import in Plex?

I’m running into this as well…

<programme channel="I12926.labs.zap2it.com" start="20170722180000 -0400" stop="20170722200000 -0400"><title>UFC on FOX 25 Prelims</title><desc /><category>Sports</category><episode-num system="">202441</episode-num></programme>

But everything shows up as Movies. Trying to confirm I’m not holding it wrong…

Maybe you have to append the lang in category?

<category lang="en">

Thanks for the suggestion. I modified my xmltv file and replaced all instances of <category> with <category lang="en"> but I’m having the same result.

Same problem as @BrianAz and it definitely recognizes the category because it shows up as a genre under Movies on the guide… it’s just ignoring the settings fields.

If anyone has a sample of an xmltv document that works it’d be helpful to see it

Edit: NVM adding any episode original air date (just used the air date since I don’t have that info from my provider) fixed it

While I can’t be 100% sure at the moment due to personal time constraints… I dug through my notes and I believe that the following are examples of a very small test XMLTV EPG I created where each type was properly sorted by category (Sports/News/Movie/Show) and appeared in the GUI mostly correct (except episode #/repeat detection).

  <programme channel="someChannel1.labs.zap2it.com" start="20170725200000 -0400" stop="20170725220000 -0400">
   <title lang="en">WWE SmackDown</title>
    <desc lang="en">Some generic description here</desc>
    <category lang="en">Sports</category>
    <episode-num system="original-air-date"></episode-num>
  </programme>
  <programme channel="someChannel2.labs.zap2it.com" start="20170725150000 -0400" stop="20170725153000 -0400">
    <title lang="en">ABC News</title>
    <desc lang="en">Live across Australia, the latest from ABC News, following today's top stories and live coverage of events as they unfold. Plus comprehensive analysis and original reporting from ABC reporters around Australia and the world.</desc>
    <category lang="en">News</category>
    <episode-num system="original-air-date"></episode-num>
 </programme>
 <programme channel="someChannel3.labs.zap2it.com" start="20170726200000 -0400" stop="20170726220000 -0400">
    <title lang="en"> A Sister's Secret</title>
    <desc lang="en">When Katherine returns to her home town to save the family business, she encounters Jane, the woman whose twin brother Sean, committed suicide after Katherine ended their relationship. Jane still blames Katherine for her brother's death, and she seizes the chance punish Katherine.</desc>
  </programme>
  <programme channel="someChannel4.labs.zap2it.com" start="20170726231000 -0400" stop="20170726001000 -0400">
    <title>Game of Thrones</title>
    <desc>Daenerys receives an unexpected visitor.</desc>
    <category>Show / Game show</category>
    <episode-num system="original-air-date">2017-07-23</episode-num>
  </programme>

We still have the issue of figuring out where to get proper values for episode-num. Only “original-air-date” and “xmltv_ns” appear to work. A lot of providers spit out “dd_progid” but as far as I can tell, Plex is not using/able to use that. Much like you, I wrote a script that modified the XML to have empty “original-air-date” as the episode-num system, except for movies to force things to work.

I’m hopeful that as this matures, there will be some additional documentation related to this to help us.

Edit: I believe I added the original air date to the Game of Thrones episode just to confirm that Plex would honor it if it was properly filled in (and it appeared to).

Any updates on this topic? Is that possible to get support from Plex team? I have the same issue. Tried to replace foreign language categories with plexip’s suggestions, but it still does not work. Everything is parsed as ‘Movies’

Ok, I’ve found out that xmltv_ns format of episode-num also fixes problem with Shows detection.
But there is still a problem with other kind of tv shows, like sport and music. They all are tracked as movies.

mothman can you give an example of correct xmltv_ns format that worked for you? Thanks

@markcs, currently I have next site config in my .ini WebGrabPlus config:

site {ratingsystem=RU|episodesystem=onscreen|allowlastpageoverflow}

So episodes are grabbed as S01 E07 or just E17 etc…
To convert this format to xmltv_ns add next line in the end of episode format/cleanup:

index_episode.modify {set('index_episode' not= "")|'index_episode'\|'index_episode'(system=xmltv_ns)}

Or

episode.modify {set('episode' not= "")|'episode'\|'episode'(system=xmltv_ns)}

Depending on yours config. This will add additional episode node

<episode-num system="xmltv_ns">3.5.</episode-num>

After

<episode-num system="onscreen">S4 E6</episode-num>

P.S: I’m using latest beta of WG++. As I remember this did not work with latest stable release. But you should check

It would be much better if Plex built its EPG from the categories that it finds in the XMLTV file. That way the EPG will be much more intuitive and flexible.

Has there been any updates to how Plex uses the categories? I’m still having issues with News programs being detected as movies:

I’ve set the News category in the Plex DVR settings:
chrome_2018-07-28_10-33-28

The data has the News category set:

<programme start="20180727233000 +0000" stop="20180728003000 +0000" channel="30">
    <title lang="en">Greek News</title>
    <desc lang="en">News via satellite. From ERT, Athens. Presented in Greek with no subtitles.(n)</desc>
    <category lang="en">News</category>
    <rating system="AU">
      <value>NC</value>
    </rating>
  </programme>

I’m really not sure what else I can change? It’d be nice to have a bit more control over how Plex deals with the XMLTV categories.

Interestingly enough - the IceTV data data is detected properly:

<programme airingID="140041433" mediaID="45891-0" start="20180726233000 +0000" stop="20180727003000 +0000" channel="10">
  <title lang="en">Greek News</title>
  <desc lang="en">News via satellite from ERT Athens, in Greek, no subtitles.</desc>
  <category lang="en">News</category>
  <language lang="en">Greek</language>
  <icon src="http://images.icetv.com.au/placeholder/45891_poster.png" width="1000" height="680" />
  <country lang="en">Greece</country>
  <episode-num system="original-air-date">2018-07-27 09:30:00</episode-num>
  <video>
   <present>yes</present>
   <colour>yes</colour>
   <aspect>16:9</aspect>
   <quality>SDTV</quality>
  </video>
  <premiere />
 </programme>

This has the same category name but perhaps Plex relies on the “Original-air-date” data?

Does anyone have any insights or advice?

1 Like

Plex requires some sort of episode numbering in order to identify TV shows, this could either be the original-air-date (as IceTV has) or it could be some sort of episode / season numbering

Could you please advise how you done that? in which file this modification needs to be done?

Thank you!

Kind of an old thread, but I tried to convert the on-screen episode information with your lines of code with no success. Are still working if yes where exactly do they need to go? Thx

Edit: Got it solved by finding the right spot to insert your line of code :wink:
Just if someone is also interested in the solution, there is another “new” way of doing this, described by one of the fine people at the webgrabplus forums: http://www.webgrabplus.com/content/convert-onscreen-episode-numbers-xmltvns

1 Like

Thank you, this “new way of doing this” saved me hours of coding and trying to understand the language of WebGrab++ (which i’ve been doing for the past 4 days).

I was importing everything into TVHeadEnd, but TVHeadEnd strips most of the information plex requires. Now, I’m still getting everything bundled under movies. Anybody made any progress with that?

I guess this behaviour is not due to tvh but simply how Plex categorises stuff. With xmltv, anything that is not recognised as a recurring TV show is a movie. Period. So I guess there is not much that you or I me can do about this. I wrote somewhere else that Plex seems to ignore the genre codes that you can put into the DVR settings, although I thought this might relate to my non-english xmltv file. Maybe this is a general issue.

1 Like