Accessory script for skin
#1
Hi all,

I think this is the right place for this question: I want to create an addon which will produce a string (creating it from a couple of Web services) that I want to display later on a skin; now, the problem is that a) I'm not sure about the correct extension point, b) how should the plugin produce that string, and then c) how to invoke it from the string.

For © I have looked at the confluence skin and how it gets the temperature information in the home widget, and I think it is a property that should be set in the addon, but for (a) and (b) I have no idea, and I cannot find examples... another hypothesis is that I can directly invoke a function of my addon from the skin, and that function will return the string, but again I am not sure at all.

Do you have any pointer to a similar example?
Reply
#2
The weather addon is a good place to look. line 38 shows how to set a property. Most addons I've seen attach properties to WINDOW_HOME = xbmcgui.Window(10000). Confluence shows how to recover these properties using Window.Property() here.

Extension point is either xbmc.service or xbmc.python.script, depending on whether you want to run continuously in the background or not. weather.wunderground, for example, is a script that XBMC calls every few hours to update the weather window's properties.
Reply
#3
Thank you for your help: it works! Just an information: I decided to implement it as a service, and I have followed some (probably old) tutorial on the XBMC wiki saying that I should put a while loop, checking for xbmc.abortRequest, and if this is not happening then I call my function.

The question is: is this loop running forever? I mean, my function could be called just when I need the values for the home page (so I guess it could be invoked just when the home page is shown), can I invoke an addon function directly from the skin, just before getting the property?
Reply
#4
another possibilty would be perhaps yahoo pipes + script.rssclient. that combination allows some sick stuff.
Donate: https://kodi.tv/contribute/donate (foundation), 146Gr48FqHM7TPB9q33HHv6uWpgQqdz1yk (BTC personal)
Estuary: Kodis new default skin - ExtendedInfo Script - KodiDevKit
Reply

Logout Mark Read Team Forum Stats Members Help
Accessory script for skin0