2020-08-28, 18:51
Hello
I am curious about the process whereby skins retrieve data from external addons?
As an example on the skin i use there is similar info which is provided by "script.skin.helper.widgets" eg:
<variable name="similarInfo">
<value condition="!String.IsEmpty(ListItem.IMDBNumber) + String.IsEqual(ListItem.DBTYPE,movie)">plugin://script.skin.helper.widgets/?action=similar&mediatype=movies&imdbid=$INFO[ListItem.IMDBNumber]&limit=12</value>
</variable>
So i had a look at the skin.helper.widgets for this part and its an actual addon page which is returned, so it makes sense how this would be picked up by the skin (basically as a widget).
But there is a script I would like to create and return some information back to the skin, i figure im probably going to have to populate a window property in my script so the skin can access the information. Which is fine.
My real query is, if I add my script as a variable somewhere, and call it on a hidden item or something will it be run and populate the window properties whenever the visibility conditions are met?
And/or does it need to be called in a variable, would i be able to add my plugin as an onload condition for the particular screen as all i do is want to populate a couple of window conditions, i dont need an addon list being returned?
Id rather not have to make a service and then trigger the window properties updating somehow, the skins clearly can run addons. But im not sure what a variable would do if i run a script which doesnt return as an actual addon but just updates a couple of window properties.
I am curious about the process whereby skins retrieve data from external addons?
As an example on the skin i use there is similar info which is provided by "script.skin.helper.widgets" eg:
<variable name="similarInfo">
<value condition="!String.IsEmpty(ListItem.IMDBNumber) + String.IsEqual(ListItem.DBTYPE,movie)">plugin://script.skin.helper.widgets/?action=similar&mediatype=movies&imdbid=$INFO[ListItem.IMDBNumber]&limit=12</value>
</variable>
So i had a look at the skin.helper.widgets for this part and its an actual addon page which is returned, so it makes sense how this would be picked up by the skin (basically as a widget).
But there is a script I would like to create and return some information back to the skin, i figure im probably going to have to populate a window property in my script so the skin can access the information. Which is fine.
My real query is, if I add my script as a variable somewhere, and call it on a hidden item or something will it be run and populate the window properties whenever the visibility conditions are met?
And/or does it need to be called in a variable, would i be able to add my plugin as an onload condition for the particular screen as all i do is want to populate a couple of window conditions, i dont need an addon list being returned?
Id rather not have to make a service and then trigger the window properties updating somehow, the skins clearly can run addons. But im not sure what a variable would do if i run a script which doesnt return as an actual addon but just updates a couple of window properties.