Parental Ratings ('PG', 'PG-13', 'FSK 12', etc) for Estuary PVR Timers and Recordings
#1
I have been doing some work on Tvheadend to enable parental rating labels ('PG', 'PG-13', 'FSK 12', etc) for TV, and I would like to discuss including these labels in the Estuary skin.

https://tvheadend.org/boards/5/topics/50356

TVH can now provide 3 data values relating to parental rating:

1) Recommended age (Already provided by DVB and included in HTSP)
2) The rating label (MPAA in the Kodi videos module and ParentalRatingCode in the PVR/EPG module)
3) The rating icon (Graphical representation of the rating label)

This has involved working with: 1) TVH to extract these fields from EPG data and process them; 2) the Kodi pvr.hts add-on to get those fields into Kodi; 3) the Kodi PVR module to store those fields as properties within the appropriate objects and; 4) the Kodi GUI/Skinning module to allow those properties to be displayed.

Recently, I submitted a PR that exposed the existing PVR EPG database 'ParentalRatingCode' column for use by skins.

https://github.com/xbmc/xbmc/pull/23586

As part of the process for accepting that PR, there was much discussion and fine tuning regarding what field could be shown on which screen and in what format.

I will eventually submit a PR for this latest change and I would like to conduct the design/layout discussion and tine-tuning in this forum rather than on GitHub so that I can just submit an agreed solution.

Rating icons can be shown in two places:

EPG details window (Shared with the recordings details window)
The details side-panel (Shared by the channels list, timers list and recordings list.)

Here are some examples of what I have currently mocked-up.  Please note:  these mock-ups currently show both the text rating label and the corresponding icon.  I plan to implement logic to show only the icon if it is available and only the text if the icon is not.

(EDIT: Images moved to imgur)

Image

Image

Image

Image

In the details window, the height is limited to 75px and in the side panels 50px due to its more compact nature.

Most of the rating icons that I have been able to identify are either mostly square/round or slightly rectangular.

https://github.com/wyrm65/resource.image...ons.colour
https://en.wikipedia.org/wiki/Television...ing_system

Because of this, I allow for icons to have an aspect ration of close to 16:9 before the height is reduced.

Comments welcome.
Reply
#2
Despite of the discussion where to show the icons, I have another question?

How do we handle internationalization? As far as I know different countries have different codes. Would kodi or even every skin need to contain „hundreds“ (all) of the PR rating icons?
Reply
#3
I anticipate that Internationalisation can be handled in one of two ways:

Totally within TVH.

DVB uses a country code and an age for its parental rating.  TVH uses these two fields to match to a rating label.  The rating label also contains an optional icon.  This is explained in the TVH forum link that I provided.

If you are in Germany, you may get DEU+8, whereas in France, you may get FRA+8.  These will match to different rating labels and therefore a different icon.  This user needs to supply their own icons.

In TVH, a similar situation occurs with XMLTV EPG feed except that they are keyed on Rating Authority + Code.

Using the existing Kodi add-on.

https://github.com/wyrm65/resource.image...ons.colour

Instead of entering a rating label like ‘PG’ into TVH, something like ‘Australia TV-PG’ will be entered.  The above add-on will translate this string into an icon from its extensive collection.
Reply
#4
Another solution is to extend the pvr addon api, namely introduction of a new field for epg events, containing the uri of the rating icon. This is how it is done for all other icons, like channel logos.
Reply
#5
(2023-10-26, 08:46)ksooo Wrote: The solution is to extend the pvr addon api, namely introduction of a new field for epg events, containing the uri of the rating icon. This is how it is done for all other icons, like channel logos.
That is exactly how it works.  TVH provides an 'imageCache' ID to the icon stored locally.  The pvr.hts add-on takes this ID, prepends the TVH server address and creates a full URL.  The skin then calls the URL to the icon file stored on the TVH server.

Any backend, not just TVH, will be able to make use of this feature in future.
Reply
#6
And how exactly will kodi access the url? A new field in the epg event pvr addon api struct? If yes, thumb up. Then we do not even need to take care about i18n, because all the work needs to be done by the backend (or the addon if the backend has no support).
Reply
#7
(2023-10-26, 07:55)ksooo Wrote: Despite of the discussion where to show the icons, I have another question?

How do we handle internationalization? As far as I know different countries have different codes. Would kodi or even every skin need to contain „hundreds“ (all) of the PR rating icons?

@ksooo,

[rant]This topic gets trotted out every couple of years and then goes away just as quick when those that come up with a solution get put off by the apathy [/rant]

My solution is documented here . The resource file is not that big and need not be the only one supported. Skin writers could support or not support the icons as they saw fit.

Now you if you were of a mind to cut a bit of code you could help out.  What is requred is a $INFO string with the country name or country code of the users Kodi system. Currently I am using an external script to provide this string, but if that script becomes non supported, my solution will stop working. Currently every skin that provides MPAA icons either uses my resource file or provides the icons within their skin for the icons that they are prepared to support (and also uses large $VAR's to select the appropriate icon for each video).

Also ideally providing the icons in the video database as a Listitem.Art would be preferable (would be even quicker than my solution), but that requires that all the scrappers to be updated, any skins that want to show the icons would need updating and most importantly each user would need to go thru and update each line of the database to include the required icons. Really don't see most of those things happening.

Wyrm (AppTV)
If required a FULL debug log can now be submitted from the skin in settings->skin settings->support. Or follow instructions here if you can't access skin settings.

FAQ's located at :- http://kodi.wiki/view/Add-on:AppTV
Reply
#8
(2023-10-26, 09:20)ksooo Wrote: And how exactly will kodi access the url? A new field in the epg event pvr addon api struct? If yes, thumb up. Then we do not even need to take care about i18n, because all the work needs to be done by the backend (or the addon if the backend has no support).
Yes, new properties exposed to the GUI.  I have already implemented this change.
 
Code:
<control type="image">
    <top>0</top>
    <height>50</height>
    <width>90</width>
    <centertop>0</centertop>
    <right>0</right>
    <texture>$INFO[ListItem.parentalratingicon]</texture>
    <aspectratio align="right" aligny="top">keep</aspectratio>
</control>

Now we just need to agree where on the screen this icon should be located.
Reply
#9
@wyrm

I realise that your rant was not directed at me, however, the new feature can work either by itself or in conjunction with your add-on.  To work with your add-on, the rating label in TVH just needs to contain a string in the format that your add-on expects.

In the PVR module, the property is called ‘ParentalRatingCode’.  In my work, I have also added an alias so that the ‘MPAA’ property will also return the ‘ParentalRatingCode’ PVR-specific property meaning that skinning should be a bit easier.

I wanted my change to TVH to be applicable to multiple front-ends, not just Kodi,  That is why I included an optional icon.
Reply
#10
(2023-10-26, 09:30)wyrm Wrote: [rant]This topic gets trotted out every couple of years and then goes away just as quick when those that come up with a solution get put off by the apathy [/rant]
(2023-10-26, 10:07)DeltaMikeCharlie Wrote: I realise that your rant was not directed at me, however, the new feature can work either by itself or in conjunction with your add-on.
See ** PROPOSED CHANGES TO CONTENT CERTIFICATION (MPAA) **
Reply
#11
(2023-10-26, 09:30)wyrm Wrote: What is requred is a $INFO string with the country name or country code of the users Kodi system.
There is already a Python API that can provide that but it is broken.

I have already submitted a PR to address it, however, there does not appear to be anyone in team Kodi that as the domain expertise to review/approve my submission.

https://github.com/xbmc/xbmc/pull/23110

The information is already there (in its incorrect state), it just needs to be exposed so that a Skin can access it.
Reply
#12
(2023-10-26, 10:30)Hitcher Wrote: See ** PROPOSED CHANGES TO CONTENT CERTIFICATION (MPAA) **
Yes, I saw that and I agree that the use of 'MPAA' needs to be reevaluated.  However, the thread appears to be old and has been inactive for at least a year.
Reply
#13
(2023-10-26, 10:53)DeltaMikeCharlie Wrote:
(2023-10-26, 10:30)Hitcher Wrote: See ** PROPOSED CHANGES TO CONTENT CERTIFICATION (MPAA) **
Yes, I saw that and I agree that the use of 'MPAA' needs to be reevaluated.  However, the thread appears to be old and has been inactive for at least a year.

@DeltaMikeCharlie,

Just to be clear, rant was directed at the universe more than anything, certainly not at you.  Yes you are correct the above thread is from 2021. If you see one of my comments in the thread, you will see I had proposed a solution three years before that. Thus my frustration with the lack of progress on the issue.  Any solution that requires multiple areas of compliance (scrapper writers, skin writers, users, etc, etc) is doomed to failure in my opinion, but I wish you well in your endeavours.

Also, yes I know the information for system locale is available from within Kodi, it just needs to be made available to skin writers. While I can read C++, writing something suitable and then submitting a pull request is slightly above my pay grade. I feel the biggest issue for one of the devs writing the required code is that there will no doubt be a massive round of bikeshedding over $INFO naming.  Surely a 99% solution now is better than a 100% solution in five years time.

Wyrm (AppTV)
Reply
#14
Are there any comments on the location of the rating icons?
Reply
#15
(2023-11-10, 08:02)DeltaMikeCharlie Wrote: Are there any comments on the location of the rating icons?

Placement of icons looks good to me in your mockups. Would say that if icons are displayed, that there is little point in showing textural ratings as well. Think you would get push back from some on displaying/removing skin elements, so would probably require a skin setting to allow user to choose. Other than that, your icon placement seems the most logical place for them.

Wyrm
Reply

Logout Mark Read Team Forum Stats Members Help
Parental Ratings ('PG', 'PG-13', 'FSK 12', etc) for Estuary PVR Timers and Recordings0