Jump to content


Photo

Expand / Explain XMLTV supported tags

xmltv guide epg

  • Please log in to reply
20 replies to this topic

#1 intellium OFFLINE  

intellium

    Advanced Member

  • Members
  • 34 posts
  • Local time: 01:40 AM

Posted 17 December 2018 - 08:23 AM

This is a request to expand / explain the XMLTV supported tags / features
 
Currently, the XMLTV supported tags seem quite basic. As far as I can tell, they are being read, but aren't being used to their full extend.
There is no documentation on which tags Emby supports and how they are implemented. So, I'm just going from personal experience here.
 
As @ Luke mentioned: 

 

Please create a feature request topic, however let's collaborate with @ garyan2 . I don't want to end up with too many similar but different ways of doing the same things. Thanks.


 
Feature requests work best with examples, so here goes.
 
Consider this current piece of XMLTV:
 
 

<programme start="20181217135500 +0000" stop="20181217142500 +0000" channel="Comedy Central HD">
    <title lang="nl">Family Guy</title>
    <sub-title>The Peter Principal</sub-title>
    <desc lang="nl">Amerikaanse animatieserie. Meg maakt gebruik van Peter's positie als tijdelijke directeur van de school om wraak te nemen op haar pestkoppen. Brian en Stewie openen een B&amp;B. </desc>
    <date>20170430</date>
    <category lang="nl">TV Drama</category>
    <category lang="en">Drama</category>
    <category lang="nl">Komedie</category>
    <category lang="en">Comedy</category>
    <icon src="somesite.com/1.png" width="180" height="260"/>
    <icon src="somesite.com/2.png" width="180" height="260"/>
    <icon src="somesite.com/3.png" width="75" height="108"/>
    <icon src="somesite.com/4.png" width="210" height="303"/>
    <icon src="somesite.com/5.png" width="110" height="159"/>
    <icon src="somesite.com/6.png"/>
    <episode-num system="onscreen">S15E18</episode-num>
    <episode-num system="thetvdb.com">series/75978</episode-num>
    <episode-num system="thetvdb.com">episode/6021539</episode-num>
    <rating system="Kijkwijzer">
      <value>6</value>
      <icon src="https://somesite.com/1.png"/>
      <icon src="https://somesite.com/2.png"/>
      <icon src="https://somesite.com/3.png"/>
    </rating>
    <star-rating>
      <value>7.2/10</value>
    </star-rating>
    <credits>
      <director>Greg Colton</director>
      <director>Dominic Bianchi</director>
      <writer>Seth MacFarlane</writer>
      <actor role="Peter Griffin">Seth MacFarlane</actor>
      <actor role="Lois Griffin">Alex Borstein</actor>
    </credits>
  </programme>

This will generate the following in the Emby guide :
 
5c178f2ce347f_currentprogram.png
 
This seems to be missing, or at least not utilizing, some of the data that is available.
Recording this, also seems to record to an "Unknown" season. 
 
What if we utilize some of the data available. Consider the following (badly done) mockup of mine:
 
5c17906980f02_mockup.png
 
This incorporates much of the available data. 
This is just an idea of what can be done. The tags used in the XMLTV file conform to the standard set out in https://github.com/X...aster/xmltv.dtd.
 
I could imagine that with working season/episode information, Emby could give an indicator to show if this program is in the library and if it has been watched.

 

Perhaps we could get some documentation up in how the Emby XMLTV implementation supports certain tags?

 

Currently unused in ui tags:

  • credits (director, writer, actor[role], etc
  • episode-num[onscreen, thetvdb.com, imdb.com]
  • rating[icon*]

With the implementation of Gracenote for some countries, I would expect the Emby UI to start showing more and more data that is available.

Please chime in with your thoughts and possible examples :)


  • Spaceboy likes this

#2 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 139791 posts
  • Local time: 06:40 PM

Posted 17 December 2018 - 12:54 PM

@ garyan2 , any suggestions?



#3 garyan2 OFFLINE  

garyan2

    Advanced Member

  • Members
  • 113 posts
  • Local time: 04:40 PM

Posted 18 December 2018 - 01:32 AM

I think you have 2 asks so far in this topic. The first, and really foremost even if not intended, is to include more information in the program details regardless of the source.

 

Some of the things that would be nice, and is supported by the XMLTV format, are:

  • Original Air Date
  • Closed Captioning
  • Audio (Stereo/Dolby/Dolby Digital/...)
  • SAP
  • Cast & Crew
  • Language
  • SD/HD
  • Reviews for movies

I think everything listed can be shown easily from the guide except for the cast & crew and maybe the movie review... that could get a bit busy.

 

The second ask, handling additional content in the XMLTV, I think there are some things that could be determined to benefit all.

  • One of the things I wish was defined in the XMLTV description is something to indicate a LIVE event. My preference would be to have a flag in the programme for this purpose (just like the NEW flag); the backup would be to accept any "category" of "Live" to set that flag for emby.
  • The "episode-num" systems defined in the XMLTV.DTD are: "xmltv_ns" and "onscreen". The systems "themoviedb.org", "thetvdb.com", and "imdb.com" are mentioned as proposed systems and I feel should be supported, but would really only be to create links for the programme. The "episode-num" systems can be pretty free flow beyond what is defined. One that I have seen out in the wild is "SxxExx" whose values can be parsed to get the season and episode numbers.

@ intellium : If emby currently supports the "onscreen" system, it still would not pick up your season and episode. The content of the "onscreen" system should be in the format "#FFEE" which I assume FF=season and EE=episode. If your onscreen value was converted to an "xmltv_ns" system with "14.17.0/1" then emby would have picked it up as Season 15 and Episode 18.

 

My thoughts on the rating system icons is this is something that emby would probably want to provide/control. Not too many XMLTV generators are going to include them and even if they do there is no way to ensure it "fits" in the emby theme. However, emby could provide a method for the user to override the default rating icons.

 

I will finish this lengthy post with this. I would certainly like to continue to be a part of this conversation and help advance the design and development of an even better product, but I am in no way in control of the XMLTV format. If we want to define new elements, or just need clarification on the intent of some of the contents, then I would start with @ rmeden . Though he is the Founder and President of Schedules Direct, he is also part of the XMLTV Project which I believe has design authority on the format.


Edited by garyan2, 18 December 2018 - 01:40 AM.

  • Spaceboy and intellium like this

#4 intellium OFFLINE  

intellium

    Advanced Member

  • Members
  • 34 posts
  • Local time: 01:40 AM

Posted 18 December 2018 - 09:44 AM

Thanks for this detailed response.
 
I agree that the inclusion of program details regardless of source should be the first concern.
 
I also think that a category named "Live" should show some kind of indicator on the EPG screen. 
In regards to the additional proposed systems like thetvdb.com, etc; I also feel Emby should support them. Just having a linkt to the meta data site in the program details is fine here.
 

@ intellium : If emby currently supports the "onscreen" system, it still would not pick up your season and episode. The content of the "onscreen" system should be in the format "#FFEE" which I assume FF=season and EE=episode. If your onscreen value was converted to an "xmltv_ns" system with "14.17.0/1" then emby would have picked it up as Season 15 and Episode 18.


I added this to my epg grabber and you are correct. Emby shows the season and episode correctly. Now for some way to let Emby indicate this program is also in one of my libraries and I have already watched it :)
 

My thoughts on the rating system icons is this is something that emby would probably want to provide/control. Not too many XMLTV generators are going to include them and even if they do there is no way to ensure it "fits" in the emby theme. However, emby could provide a method for the user to override the default rating icons.


I strongly feel this should be taken from the XMLTV file if present. The rating specifies a single system and value, but allows multiple icons. These icons convey extra meaning in my situation, as they are icons indicating if a program contains swearing, sexual content, vice usage, etc. There is no other place in the current spec to define these cleanly I think.

 

 



#5 garyan2 OFFLINE  

garyan2

    Advanced Member

  • Members
  • 113 posts
  • Local time: 04:40 PM

Posted 18 December 2018 - 10:37 AM

I strongly feel this should be taken from the XMLTV file if present. The rating specifies a single system and value, but allows multiple icons. These icons convey extra meaning in my situation, as they are icons indicating if a program contains swearing, sexual content, vice usage, etc. There is no other place in the current spec to define these cleanly I think.

 

I agree the reason for the rating should be included as well, and that information is available in the XMLTV files as a separate system, at least the files I generate with EPG123. It is generally accepted to be the "advisory" system for this information and is something other generators provide as well. My idea would be for emby to provide the rating icon (G, PG, PG-13, R, etc), and then the reasons for the rating would just be text in the program details.

<rating system="advisory">
  <value>Adult Situations</value>
</rating>
<rating system="advisory">
  <value>Violence</value>
</rating>

  • intellium likes this

#6 intellium OFFLINE  

intellium

    Advanced Member

  • Members
  • 34 posts
  • Local time: 01:40 AM

Posted 18 December 2018 - 07:04 PM

I haven't seen this, but it's easy enough for me to incorporate it in my grabber. I'm fine with anything, as long as it gets documented somewhere so we know what is supported and how it's implemented. 



#7 garyan2 OFFLINE  

garyan2

    Advanced Member

  • Members
  • 113 posts
  • Local time: 04:40 PM

Posted 26 December 2018 - 09:20 PM

Just want to keep this going a little bit. I had to update some of my EPG123 code to adapt to API changes from Schedules Direct and included some XMLTV work. I'll just show some things from the examples that are available for use.

 

Other than the adds that were asked for, I see one area that needs improvement. As you can see, there can be multiple <rating/> systems with values, and it appears that emby simply takes the last one, puts a border around the value, and displays that on the details. Both Chicago Fire and Jennifer Either will be rated [Violence].

 

Chicago Fire should be rated [TV-14] with a rating reason of "Violence"; Jennifer Eight should be rated [R] with a rating reason of "Adult Situations, Language, Nudity, Violence". Of course the ratings should be different depending on the users preferred rating system. <== that's the difficult part.

  <programme start="20181227020000 +0000" stop="20181227030000 +0000" channel="EPG123.42676.schedulesdirect.org">
    <title>Chicago Fire</title>
    <sub-title>Going to War</sub-title>
    <desc>Firehouse 51 bands together to fight a raging fire on the 20th floor of the residential high-rise where Jay and Will Halstead's father lives and has gone missing; in the midst of the chaos, Brett learns unsettling information about her new partner.</desc>
    <credits>
      <director>Sanford Bookstaver</director>
      <actor role="Matthew Casey">Jesse Spencer</actor>
      <actor role="Kelly Severide">Taylor Kinney</actor>
      <actor role="Chief Wallace Boden">Eamonn Walker</actor>
      <actor role="Christopher Herrmann">David Eigenberg</actor>
      <actor role="Joe Cruz">Joe Minoso</actor>
      <actor role="Brian &quot;Otis&quot; Zvonecek">Yuri Sardarov</actor>
      <actor role="Randy &quot;Mouch&quot; McHolland">Christian Stolte</actor>
      <actor role="Sylvie Brett">Kara Killmer</actor>
      <actor role="Stella Kidd">Miranda Rae Mayo</actor>
      <writer>Derek Haas</writer>
      <producer>Derek Haas</producer>
      <producer>Michael Brandt</producer>
      <producer>Jeffrey Nachmanoff</producer>
      <producer>Dick Wolf</producer>
      <producer>Peter Jankowski</producer>
      <producer>Danielle Gelber</producer>
      <guest>Annie Ilonzeh</guest>
      <guest>Steven Boyer</guest>
      <guest>Jesse Lee Soffer</guest>
      <guest>Brian Tee</guest>
      <guest>Kristen Gutoskie</guest>
    </credits>
    <date>20181003</date>
    <category>Series</category>
    <category>Drama</category>
    <category>Action</category>
    <language>en</language>
    <icon src="https://s3.amazonaws.com/schedulesdirect/assets/p9257455_b_v5_av.jpg" />
    <episode-num system="dd_progid">EP01567915.0146</episode-num>
    <episode-num system="xmltv_ns">6.1.0/1</episode-num>
    <episode-num system="thetvdb.com">series/258541</episode-num>
    <video>
      <quality>HDTV</quality>
    </video>
    <audio>
      <stereo>dolby digital</stereo>
    </audio>
    <previously-shown start="20181003" />
    <subtitles type="teletext" />
    <rating system="Australian Classification Board">
      <value>MA 15+</value>
    </rating>
    <rating system="Canadian Parental Rating">
      <value>14+</value>
    </rating>
    <rating system="Departamento de Justiça, Classificação, Títulos e Qualificação">
      <value>14</value>
    </rating>
    <rating system="Mediakasvatus- ja kuvaohjelmayksikkö">
      <value>K12</value>
    </rating>
    <rating system="Film &amp; Publication Board">
      <value>13</value>
    </rating>
    <rating system="USA Parental Rating">
      <value>TV14</value>
    </rating>
    <rating system="VCHIP">
      <value>TV-14</value>
    </rating>
    <rating system="advisory">
      <value>Violence</value>
    </rating>
  </programme>

  <programme start="20181227123000 +0000" stop="20181227150000 +0000" channel="EPG123.100105.schedulesdirect.org">
    <title>Jennifer Eight</title>
    <desc>After discovering his wife's adultery, Los Angeles detective John Berlin (Andy Garcia) relocates to recover and work alongside old friend Freddy Ross (Lance Henriksen) in the peaceful small town of Eureka, Calif. When a severed hand is found in a garbage dump, John realizes it belongs to a missing blind woman and connects it to six similar murders. Fearing the next to die will be Helena Robertson (Uma Thurman), the blind roommate of the last victim, John tries to protect her and find the killer.</desc>
    <credits>
      <director>Bruce Robinson</director>
      <actor role="John Berlin">Andy Garcia</actor>
      <actor role="Helena">Uma Thurman</actor>
      <actor role="Freddy Ross">Lance Henriksen</actor>
      <actor role="Margie Ross">Kathy Baker</actor>
      <actor role="John Taylor">Graham Beckel</actor>
      <actor role="Citrine">Kevin Conway</actor>
      <actor role="St. Anne">John Malkovich</actor>
      <actor role="Travis">Perry Lang</actor>
      <actor role="Bisley">Nicholas Love</actor>
      <actor role="Serato">Michael O'Neill</actor>
      <actor role="Venables">Paul Bates</actor>
      <actor role="Blattis">Lenny Von Dohlen</actor>
      <writer>Bruce Robinson</writer>
    </credits>
    <date>1992</date>
    <category>Movie</category>
    <category>Thriller</category>
    <language>en</language>
    <icon src="https://s3.amazonaws.com/schedulesdirect/assets/p14363_d_v5_aa.jpg" />
    <episode-num system="dd_progid">MV00035913.0000</episode-num>
    <subtitles type="teletext" />
    <rating system="British Board of Film Classification">
      <value>18</value>
    </rating>
    <rating system="Régie du cinéma">
      <value>13+</value>
    </rating>
    <rating system="Departamento de Justiça, Classificação, Títulos e Qualificação">
      <value>16</value>
    </rating>
    <rating system="Freiwillige Selbstkontrolle der Filmwirtschaft">
      <value>16</value>
    </rating>
    <rating system="Motion Picture Association of America">
      <value>R</value>
    </rating>
    <rating system="UK Content Provider">
      <value>15</value>
    </rating>
    <rating system="advisory">
      <value>Adult Situations</value>
    </rating>
    <rating system="advisory">
      <value>Language</value>
    </rating>
    <rating system="advisory">
      <value>Nudity</value>
    </rating>
    <rating system="advisory">
      <value>Violence</value>
    </rating>
    <star-rating>
      <value>2.0/4</value>
    </star-rating>
  </programme>



#8 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 139791 posts
  • Local time: 06:40 PM

Posted 27 December 2018 - 03:26 PM

Yea we should probably be taking the first rating i would think.



#9 garyan2 OFFLINE  

garyan2

    Advanced Member

  • Members
  • 113 posts
  • Local time: 04:40 PM

Posted 27 December 2018 - 04:25 PM

Yea we should probably be taking the first rating i would think.

 

I think it will have to be smarter than that. Each one of those rating systems will be region/country specific so the location setting of the server will need to play a role.



#10 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 139791 posts
  • Local time: 06:40 PM

Posted 27 December 2018 - 04:40 PM

Right, based on the user's language setting, we do already look for the rating with a matching lang="xxx" attribute. But if there are multiple matches or zero matches, then we should probably just use the first one available.



#11 samuelqwe OFFLINE  

samuelqwe

    Advanced Member

  • Members
  • 328 posts
  • Local time: 05:40 PM
  • LocationEarth, Milky Way

Posted 27 December 2018 - 04:42 PM

Right, based on the user's language setting, we do already look for the rating with a matching lang="xxx" attribute. But if there are multiple matches or zero matches, then we should probably just use the first one available.


Perhaps this should be a setting on the XMLTV configuration page. Leave a field for advanced users, but if left blank, just use the first rating.

#12 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 139791 posts
  • Local time: 06:40 PM

Posted 27 December 2018 - 04:47 PM

What setting? It is using the default metadata language and country settings under Library -> Metadata.

 

Yes I suppose in theory we could move it from the global settings to the xmltv settings so that you can customize per guide source.



#13 samuelqwe OFFLINE  

samuelqwe

    Advanced Member

  • Members
  • 328 posts
  • Local time: 05:40 PM
  • LocationEarth, Milky Way

Posted 27 December 2018 - 11:20 PM

Yes I suppose in theory we could move it from the global settings to the xmltv settings so that you can customize per guide source.


That would be the best way to do it. In those previous posts, the guide data seen has multiple ratings for different countries/regions. In my case, I would not have any use for this as my guide data includes only a single rating. However, if I decided to use guide data including multiple ratings, they may not necessarily be named the same way as in the other posts seen in this topic.

Edited by samuelqwe, 28 December 2018 - 02:41 PM.


#14 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 139791 posts
  • Local time: 06:40 PM

Posted 28 December 2018 - 12:01 AM

Thanks for the feedback.



#15 intellium OFFLINE  

intellium

    Advanced Member

  • Members
  • 34 posts
  • Local time: 01:40 AM

Posted 28 December 2018 - 05:07 AM

What setting? It is using the default metadata language and country settings under Library -> Metadata.

 

Yes I suppose in theory we could move it from the global settings to the xmltv settings so that you can customize per guide source.

 

What about going by the user language settings, instead of the system one?

 

So, in this order, first one found wins: 

 

User language settings => Server default setting => 1st rating



#16 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 139791 posts
  • Local time: 06:40 PM

Posted 28 December 2018 - 12:58 PM

Well that means we'd have to store all the ratings in the database, which we don't currently do.



#17 intellium OFFLINE  

intellium

    Advanced Member

  • Members
  • 34 posts
  • Local time: 01:40 AM

Posted 28 December 2018 - 06:14 PM

Why stop at the ratings? What if everything is stored in the database with it's language tag?

That way, the client can show native language content if it's available.



#18 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 139791 posts
  • Local time: 06:40 PM

Posted 28 December 2018 - 06:15 PM

Sure, in theory, but that's not a pattern we currently have, and thus, not something that is likely to happen in the short term.



#19 garyan2 OFFLINE  

garyan2

    Advanced Member

  • Members
  • 113 posts
  • Local time: 04:40 PM

Posted 29 December 2018 - 02:44 AM

This might be a little simplistic, but why not have a field when setting up the XMLTV for rating systems? Just like you do for categories? There are way too many sources for XMLTV files, and probably way too many ways to spell/abbreviate systems. Ultimately it will be the user that will better understand what their source is and best determine what they want. I just think using the language identifier as being a little too loose and subject to failure. I'm sure the UK folks don't want to see MPAA ratings, just like USA folks don't want to see those logical number rating systems.

 

EDIT : Example would be...

 

Content Rating Systems:

[ USA Parental Rating|Motion Picture Association of America ]

Content rating systems with these titles will be used for program ratings with the first being the highest priority. Separate multiple with '|'.

 

EDIT2:

I guess I should read and catch up with the whole thread before I post. I believe what I described is the same as what @ samuelqwe was describing above.


Edited by garyan2, 29 December 2018 - 03:08 AM.


#20 samuelqwe OFFLINE  

samuelqwe

    Advanced Member

  • Members
  • 328 posts
  • Local time: 05:40 PM
  • LocationEarth, Milky Way

Posted 29 December 2018 - 03:12 AM

Yeah, @ garyan2 same as what I described, however your explanation is a lot clearer and more detailed.





Also tagged with one or more of these keywords: xmltv, guide, epg

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users