xteve-project / xTeVe

M3U Proxy for Plex DVR and Emby Live TV
MIT License
1.84k stars 238 forks source link

Xteve XMLTV output drops rating tag #160

Closed sfatula closed 4 years ago

sfatula commented 4 years ago

Sample xmltv input to xteve:

  <programme start="20200715211500 +0000" stop="20200715230000 +0000" channel="5a66795ef91fef2c7031c599">
    <title lang="en">The Boy Downstairs</title>
    <sub-title lang="en">The Boy Downstairs</sub-title>
    <desc lang="en">Diana (Zosia Mamet, "The Kids are All Right") moves back to New York City after a few years abroad and finds the perfect apartment. Yet on the first night in her new home, she discovers that her ex-boyfriend lives in the apartment below hers.</desc>
    <date>20180216000000 +0000</date>
    <category lang="en">Independent</category>
    <rating>
      <value>PG-13</value>
    </rating>
  </programme>

What xteve outputs when using xepg:

      <programme channel="1010" start="20200715211500 +0000" stop="20200715230000 +0000">
          <title lang="en">The Boy Downstairs</title>
          <sub-title lang="en">The Boy Downstairs</sub-title>
          <desc lang="en">Diana (Zosia Mamet, &#34;The Kids are All Right&#34;) moves back to New York City after a few years abroad and finds the perfect apartment. Yet on the first night in her new home, she discovers that her ex-boyfriend lives in the apartment below hers.</desc>
          <category lang="en">Independent</category>
          <category lang="en">Movie</category>
          <icon height="" src="http://192.168.3.18:34400/images/5017077a1a8b2747b1cd26242f274752.png" width=""></icon>
          <video></video>
          <date>20180216000000 +0000</date>
      </programme>

Note rating is dropped. Here is another sample of rating from an existing case, though curiously it's not mentioned:

https://github.com/xteve-project/xTeVe/issues/44#issuecomment-552651688

Rating is extremely useful for many purposes, including blocking children from watching, etc.

**Server / Desktop

To Reproduce Using xepg, use a xmltv file with rating tags in it as input on the XMLTV tab Allow xteve (or force it) to create an output xteve.xml Notice it has dropped the Rating tag.

Expected behavior I expect xteve to pass through the rating tag as is as it's part of the xmltv spec.

**Desktop

mar-mei commented 4 years ago

The following XML tags are currently not supported. rating, star-rating, credits But will be implemented soon.

In your example, the attribute system is missing. According to my research, the value is not enough.

    <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 & 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>
sfatula commented 4 years ago

There are other valid systems near as I can tell, for example MPAA is the biggest one here in the US (with ratings such as R, PG-13, etc.). According to the dtd found at https://github.com/XMLTV/xmltv/blob/master/xmltv.dtd, system is defined as "implied" which should mean optional.

Thanks for considering the request.

mar-mei commented 4 years ago

As it looks, Plex always uses the first entry if more are available. The language tag of the XMLTV file and the language set in Plex seems to be ignored :(

sfatula commented 4 years ago

For me, am only going to put one rating per program so not an issue. I'd love the feature despite any limitation.

mar-mei commented 4 years ago

The missing tags are now in the beta branch: https://github.com/xteve-project/xTeVe#xteve-beta-branch

sfatula commented 4 years ago

So, I have tested this for a bit and I have had zero issue. But I only tested (and used) the rating addition, not the others as I don't use those. Working great! Thanks!