v20 Changes to the skinning engine for Kodi Nexus
2022-05-04 New integer info
- Skin.Numeric(setting)

This integer info allows you to obtain the value of a given skin setting as an integer value. It may be useful for use within Integer.* info bools in complex comparisons (once https://github.com/xbmc/xbmc/pull/21352 goes in).

example of what can be done (not really of particular use though Smile ): Integer.IsEven(Skin.Numeric(mysetting))

Pull request: https://github.com/xbmc/xbmc/pull/21329
2022-05-05 Integer.* info conditions now support comparisons against other infos

Integer info conditions previously only allowed comparisons to fixed numbers, example: 
Now Kodi supports comparisons between other integer infos too: example:

PR: https://github.com/xbmc/xbmc/pull/21352
2022-05-05 Added Integer.ValueOf integer info

To be able to convey fixed number values as integer conditions Kodi now supports a new integer info:
This is mainly used internally for translation but you can use it to represent an integer:
will be evaluated to 4.
In the examples of the previous post:

is the same as

PR: https://github.com/xbmc/xbmc/pull/21352
2022-05-09 Added Player.HasPerformedSeek(interval) boolean condition

A new info boolean condition: Player.HasPerformedSeek(interval) was added. It allows skins to display stuff or take actions if the player has performed a seek on the last provided second interval. For instance:

Player.HasPerformedSeek(1) returns true if the player has performed a seek in the last second.
Player.HasPerformedSeek(3) returns true if the player has performed a seek in the last 3 seconds.

The goal of this is to replace the old Player.DisplayAfterSeek that is, at the moment, one of the last points of contact/direct dependency between the VideoPlayer and the GUI layer and an anti-pattern (it dictates for how long skins should display stuff and not the other way around).

PR: https://github.com/xbmc/xbmc/pull/21366
2022-05-17 - Added Addon.SettingStr, Addon.SettingBool and Addon.SettingInt infos

Addon.SettingStr(addon_id, setting_id) -> returns the value of the setting (as a string)
Addon.SettingBool(addon_id, setting_id) -> returns the value of an addon boolean setting (boolean condition)
Addon.SettingInt(addon_id, setting_id) -> returns the value of an addon integer setting (integer info).

This allows, to define visibility conditions depending on enabled addon settings. For instance, you can now hide/show a specific context menu item depending on a setting on your addon.

PR: https://github.com/xbmc/xbmc/pull/21405
2022-05-18 - Added VideoPlayer.Art(type) infolabel as well as all the positional variants

VideoPlayer.Art(type) infolabel as well as all the positional variants were adeded

VideoPlayer.Offset(x).Art(type) - returns the path for the requested art type for the x item in the playlist, with respect to the current playing item
VideoPlayer.Position(x).Art(type) - returns the path for the requested art type for the x item in the playlist, with respect to the playlist start

PR: https://github.com/xbmc/xbmc/pull/21401
2022-05-22 - Removed Player.DisplayAfterSeek boolean condition

The old Player.DisplayAfterSeek boolean condition was a design flaw of Kodi since it was coupling the videoplayer with GUI components. It was removed and replaced by the previously added Player.HasPerformedSeek(interval) boolean condition.
By default Player.DisplayAfterSeek was valid for 2.5 seconds after a seek. To retain similar behaviour please use Player.HasPerformedSeek(3). Estuary and estouchy were adapted in https://github.com/xbmc/xbmc/pull/21380

PR: https://github.com/xbmc/xbmc/pull/21425
2022-05-23 - Introduction of skin timers

Kodi v20 (Nexus) will introduce a new skin feature - Skin Timers. Skin timers are skin objects that are dependent on time and can be fully controlled from skins either using Builtin functions or Infolabels and Boolean conditions. One can see them as stopwatches that can be activated and deactivated automatically depending on the value of info expressions or simply activated/deactivated manually from builtins. The framework was created to allow skins to control the visibility of windows (and controls) depending on the elapsed time of timers the skin defines. Skin timers allow multiple use cases in skins, previously only available via the execution of python scripts:
  1. Closing a specific window after x seconds have elapsed
  2. Controlling the visibility of a group (or triggering an animation) depending on the elapsed time of a given timer
  3. Defining a buffer time window that is kept activated for a short period of time (e.g. keep controls visible for x seconds after a player seek)
  4. Executing timed actions (on timer stop or timer start)
  5. etc
For a full overview over the functionality please check the doxygen page (feel free to port to the wiki as well): Skin Timers (Doxygen)
For concrete implementations in Kodi (apart from the provided examples) please check:
PR: https://github.com/xbmc/xbmc/pull/21320
2022-06-05 - Avoid rendering highly transparent elements

Nexus will avoid rendering highly transparent (<1% transparency) elements. Previously, the GUI engine would still render such invisible objects, resulting in unnecessary hogging of rendering resources.

PR: https://github.com/xbmc/xbmc/pull/21387
2022-06-26 Added diffuse color fading

With Nexus, a new effect type "fadediffuse" has been added. Diffuse colors can now be animated:
<animation effect="fadediffuse" start="FF00FF00" end="FFFF0000" time="200" tween="sine">WindowClose</animation>

It is very similar to the "fade" effect, but accepts "AARRGGBB" colors as start and end values. In the example, the animation will fade from green to red.

The goal of this is to offer a function to replace filter elements placed on top of posters and thumbnails.

PR: https://github.com/xbmc/xbmc/pull/21400
2022-06-29 Added ListItem.Property(WatchedEpisodePercent) infolabel for tvshows

Skins can now display the % progress (watched_episodes/total_episodes * 100) of tvshows. This is done by using the ListItem.Property(WatchedEpisodePercent) infolabel

PR: https://github.com/xbmc/xbmc/pull/21604/files
2022-07-4 ListItem.Property(WatchedEpisodePercent) is now available also available at the seasons level

Technically not a new feature but the property in the post above is now also available at the seasons node (I missed this on the previous PR).

PR: https://github.com/xbmc/xbmc/pull/21631
2022-07-05 Implemented "movingspeed" tag to "mover" and "resize" controls

This implementation allows for XML skins to configure the direction of movements and to configure the motion speed simulation for the input device.

PR: https://github.com/xbmc/xbmc/pull/21364
Dev-Maintainer of Netflix add-on ▫ Skills Python, C#, VB.NET and a bit of C++
2022-09-05 Added Control.SetVisible() / Control.SetHidden() builtins

Ronie added 2 new builtins to Kodi: Control.SetVisible(controlid) and Control.SetHidden(controlid).

In the past, skinners would have to use a combination of setting window properties and doing string compares in the visible condition if they want to hide certain elements, which is a bit clumsy (and resource intensive).
With this new feature, it becomes as simple as: <onclick>Control.SetHidden(123)</onclick>

PR: https://github.com/xbmc/xbmc/pull/20917
2022-09-25 Add System.Setting(hideunwatchedepisodethumbs) info bool

Currently Listitem.Thumb and Listitem.Art(thumb) have different behaviours. Historically, Kodi (xbmc) had a single source of truth for the image of a given item (Listitem.thumb). This infolabel returned different art types depending on the media item (poster for movies, thumb for episodes, etc). Things got worse when advanced logic was introduced into those infolabels - for example hiding the thumb if "hide thumbs for unwatched episode" setting is enabled. This not only makes the code cumbersome (it's even dumped into CFileItem) but also highly limits the possibilities for skins: atm kodi places the fanart in Listitem.Thumb if the setting is enabled, but what if the skin wants to show something else instead?

IMHO this type of logic belongs to conditionals in the presentation layer (skins) and not really on the core. Unfortunately changing this as a PoC on Estuary is not possible due to missing infobools. Hence, this change is the first step, introduces System.Setting(hideunwatchedepisodethumbs) so that skins can detect if the setting is enabled and react accordingly.
Note that Listitem.Thumb is currently deprecated!


Logout Mark Read Team Forum Stats Members Help
Changes to the skinning engine for Kodi Nexus0
This forum uses Lukasz Tkacz MyBB addons.