Guide Data with Content Ratings

I've noticed that if I pull guide data out into an xml file using the standard http://xyz.com:8089/devices/ANY/guide/xmltv URL I do not get content ratings. However, if I pull data back using http://xyz.com:8089/devices/ANY/guide I get content ratings. Is it possible to get the content ratings field added to the xmltv exports?

Can you give an example of the xml you're wanting

Using http://xyz.com:8089/devices/ANY/guide I get "Ratings" fields:

"ratings":[{"body":"Canadian Parental Rating","code":"PG"},{"body":"λ°©μ†‘ν†΅μ‹ μ‹¬μ˜μœ„μ›νšŒ","code":"12"},{"body":"Australian Classification Board","code":"PG"},{"body":"Freiwillige Selbstkontrolle Fernsehen","code":"12"},{"body":"USA Parental Rating","code":"TV14"}],

While the http://xyz.com:8089/devices/ANY/guide/xmltv url does not provide any content ratings fields. Channels DVR has this data as provided by the JSON. Just wondering if these fields can somehow be added to the XMLTV export. XMLTV can be exported to Plex and Emby while the JSON cannot and it's nested so not easily converted.

You gave an example of the JSON. Can you give an example of the xml you're wanting? What is the specific format of the xml you are wanting us to generate that will be consumed by the things you want to use it in?

There is a rating element in XMLTV:

    <rating system="BBFC">
      <value>15</value>
    </rating>
    <rating system="MPAA">
      <value>NC-17</value>
      <icon src="NC-17_symbol.png" />
    </rating>
    <star-rating system="TV Guide">
      <value>4/5</value>
      <icon src="stars.png" />
    </star-rating>
    <star-rating system="IMDB">
      <value>8/10</value>
    </star-rating>
1 Like

Mine does not have a rating system. Not sure why.

This is what I see:

> <tv source-info-name="channels-dvr">
> <channel id="7.1">
> <lcn>7.1</lcn>
> <display-name>KLTVDT</display-name>
> <display-name>ABC</display-name>
> <icon src="https://tmsimg.fancybits.co/assets/s28708_h3_aa.png?w=360&h=270"/>
> </channel>
> <programme start="20240208030200 +0000" stop="20240208040000 +0000" channel="7.1">
> <title>Judge Steve Harvey</title>
> <sub-title>Current Friend Count: Zero</sub-title>
> <desc>Feuds over a dream honeymoon; unpaid sports bets; a bad haircut from grandma.</desc>
> <category>Episode</category>
> <category>Series</category>
> <category>Reality</category>
> <icon src="https://tmsimg.fancybits.co/assets/p24407761_b_h9_ac.jpg?w=720&h=540"/>
> <series-id system="tms">20568019</series-id>
> <date>20240207</date>
> <episode-num system="tms">EP039836730023</episode-num>
> <episode-num system="onscreen">S2E11</episode-num>
> <episode-num system="xmltv_ns">1.10.</episode-num>
> <new/>
> <credits>
> <actor>Steve Harvey</actor>
> </credits>
> <video>
> <quality>HDTV</quality>
> </video>
> </programme>
> <programme start="20240208040000 +0000" stop="20240208043500 +0000" channel="7.1">
> <title>KLTV 7 East Texas News at Ten</title>
> <category>Show</category>
> <category>Series</category>
> <category>News</category>
> <icon src="https://tmsimg.fancybits.co/assets/p16635087_b_h9_aa.jpg?w=720&h=540"/>
> <series-id system="tms">16635087</series-id>
> <date>20190223</date>
> <episode-num system="tms">SH031718780000-1707364800</episode-num>
> <new/>
> </programme>

However, the JSON provided earlier (just remove the xmltv) from the URL and it has the ratings data.

This is what I'd like see included from the JSON that is not in the xmltv:

[{"body":"USA Parental Rating","code":"TVPG"}

> [{"Airings":[{"Source":"tms","Channel":"7.1","OriginalDate":"2024-02-07","Time":1707361320,"Duration":3480,"Title":"Judge Steve Harvey","EpisodeTitle":"Current Friend Count: Zero","Summary":"Feuds over a dream honeymoon; unpaid sports bets; a bad haircut from grandma.","FullSummary":"Feuds over a dream honeymoon; unpaid sports bets; a bad haircut from grandma.","Image":"https://tmsimg.fancybits.co/assets/p24407761_b_h9_ac.jpg?w=720\u0026h=540","Categories":["Episode","Series"],"Genres":["Reality"],"Tags":["CC","DD 5.1","DVS","HD 720p","HDTV","New","Stereo"],"SeriesID":"20568019","ProgramID":"EP039836730023","SeasonNumber":2,"EpisodeNumber":11,"Cast":["Steve Harvey"],"ReleaseYear":2024,"ContentRating":"TV-PG","SearchScore":0.03513156993782548,"Raw":{"startTime":"2024-02-08T03:02Z","endTime":"2024-02-08T04:00Z","duration":58,"channels":["7.1"],"stationId":"49529","qualifiers":["CC","DD 5.1","DVS","HD 720p","HDTV","New","Stereo"],"program":{"tmsId":"EP039836730023","rootId":"26544215","seriesId":"20568019","entityType":"Episode","subType":"Series","title":"Judge Steve Harvey","titleLang":"en","episodeTitle":"Current Friend Count: Zero","episodeNum":11,"seasonNum":2,"releaseYear":2024,"releaseDate":"2024-02-07","origAirDate":"2024-02-07","descriptionLang":"en","shortDescription":"Feuds over a dream honeymoon; unpaid sports bets; a bad haircut from grandma.","longDescription":"Feuds over a dream honeymoon; unpaid sports bets; a bad haircut from grandma.","topCast":["Steve Harvey"],"genres":["Reality"],"ratings":[{"body":"USA Parental Rating","code":"TVPG"},{"body":"Canadian Parental Rating","code":"PG"}],"preferredImage":{"uri":"https://tmsimg.fancybits.co/assets/p24407761_b_h9_ac.jpg?w=720\u0026h=540","height":"540","width":"720","primary":"true","category":"Banner-L1","text":"yes","tier":"Season"}}}},{"Source":"tms","Channel":"7.1","OriginalDate":"2019-02-23","Time":1707364800,"Duration":2100,"Title":"KLTV 7 East Texas News at Ten","Image":"https://tmsimg.fancybits.co/assets/p16635087_b_h9_aa.jpg?w=720\u0026h=540","Categories":["Show","Series"],"Genres":["News"],"Tags":["HD 720p","New"],"SeriesID":"16635087","ProgramID":"SH031718780000-1707364800","ReleaseYear":2019,"SearchScore":0.0374195925909446,"Raw":{"startTime":"2024-02-08T04:00Z","endTime":"2024-02-08T04:35Z","duration":35,

Just a request if it's something that would be easy to include as an additional field in the XML. Although if it's showing for some in the xmltv url, not sure what I might be doing wrong. :slight_smile:

My post was the example direct from the XMLTV DTD, not that I was receiving ratings in Channels' output.

I was providing it so Eric did not have to parse the DTD directly (but provided a link if he so chooses).

Ah got you. Thank you!

@racameron Are you familiar with if Plex or Emby makes use of these?

No, sorry. I only use Plex for local personal media, and stay away from Emby; I have no clue how they display guide data from XMLTV sources. I would hazard a guess that they probably display as tags similar to how Channels displays them.

I imagine when outputting the XML, the writer/serializer can easily spit out the ratings in the same manner as the episode-num element gets written.

Both Plex and Emby will read the ratings data. I’ve gotten data from other sources and both will read it correctly, it’s just script based a not as streamlined.

@eric Do you need anything else to look into this? Thank you!

It was added already.

Wow, thank you!! I just upgraded to the latest beta and it's there. Thank you!!