New Addon Manager informations for developers. - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26) +--- Thread: New Addon Manager informations for developers. (/showthread.php?tid=70731) |
New Addon Manager informations for developers. - queeup - 2010-03-25 Hi, I guess Addon Manager development almost finished. Could you share some important things with us? I want to be ready before new Addon Manager release. I have description.xml sample one of the @rwparris send to us via e-mail. But it's seems old now. I need new example file with all new strings. Any other information also appreciated - ppic - 2010-03-25 ready to learn - jurrabi - 2010-03-25 I got some plugins to start working with some changes... I'd like to share them. Be aware that this is not developers info, but just try&fail testing... 1. You need the plugin in the new addons directory 2. You need a unique ID per plugin. The team is naming something like "inverted.domain.type" but some programmers have told me that you can name it what ever you want, as far as it is unique. 3. You need a description.xml file. Plugin structure: [HTML]<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <addoninfo> <id>com.domain.pluginID</id> <type>plugin</type> <supportedcontent> <content>video</content> </supportedcontent> <title>plugin title</title> <library>default.py</library> <version>1.0.0</version> <platforms> <platform>all</platform> <platform>windows</platform> <platform>linux</platform> </platforms> <minversion> <xbmc>25000</xbmc> </minversion> <summary>Sort description of plugin content</summary> <description>Detailed description of plugin functions</description> <author>you</author> </addoninfo>[/HTML] 4. xbmcplugin module has some changes. 4.1 xbmcplugin.getSetting grows in parameters from 1 to 2. now a call looks like this:
Code: pluginhandle = int (sys.argv[1]) 4.2 xbmcplugin.openSettings disappears. Don't know new option for this yet. If you want I can keep updating this until official word from developers... - jmarshall - 2010-03-26 There may be some more changes to the XML in the wind which is why it hasn't yet been announced The above is correct regarding id and the handle change for xbmcplugin.getSetting. Cheers, Jonathan - queeup - 2010-03-26 Thx for answers guys. I want to ask some questions. <supportedcontent> is equivalent with xbmcplugin.setContent ? If it's equivalent we don't need to use setContent in plugin code I guess. Is it possible to use xbmcplugin.setSetting & xbmcplugin.getSetting for argv? I mean can I use it instead of this code? PHP Code: params = dict(part.split('=') for part in sys.argv[ 2 ][ 1: ].split('&')) - jurrabi - 2010-03-26 Nope (and correct me if I'm wrong) What you talk about are parameters, that you still get the same way. settings are what the user can configure about your plugin in the plugin configuration screen. - CrashX - 2010-03-26 <platforms> <platform>all</platform> <platform>windows</platform> <platform>linux</platform> </platforms> Why have <platform>all</platform> ? - ppic - 2010-03-26 thinks, that's just an example no ? - queeup - 2010-03-26 yes. if you use <platform>all</platform> you don't need others. - saspes - 2010-04-16 Problem with xbmcplugin.setSetting(): Add: self._handle = int(sys.argv[ 1 ]) xbmcplugin.setSetting( self._handle, "temp", "temp" ) ERROR: more keyword list entries than argument specifiers - jurrabi - 2010-04-16 Use something like this (or just the else part if you are not interested in a multiversion compatible script): Code: if VERSION_XBMC <= 28764: and to get the xbmc version I'm using something like this (I'm sure there are better ways) Code: try: - highlandsun - 2010-06-09 Where's the official documentation for these changes? I've tried updating the hulu plugin - written an addon.xml file for it, tweaked the getSettings API, but I get nothing. Using a fresh pull, svn r30995. In the xbmc.log I see this: 23:46:18 T:139723181070400 M:3003072512 INFO: ADDON: cpluff: 'Plug-in xbmc.gui has been installed.' 23:46:18 T:139723181070400 M:3003072512 INFO: ADDON: cpluff: 'Plug-in plugin.video.hulu has been installed.' But my Video library is empty. What's the trick to get it to actually load? Would be nice if one of the sticky posts got updated with this info. The wiki is out of date, and there doesn't appear to be any other doc anywhere. - jmarshall - 2010-06-09 Official docs are in process. In the meantime, here's one I did for one of the other plugins that was around here a while ago: Code: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> There's a schema for the xbmc.python.pluginsource extension point inside the xbmc.python folder in SVN: http://trac.xbmc.org/browser/trunk/addons/xbmc.python/pluginsource.xsd Similarly, there's a schema in the other xbmc.addon folder for the xbmc.addon.metadata extension point. Cheers, Jonathan - highlandsun - 2010-06-09 Thanks, that helped. Now it's pretty much working, but none of my plugin's localized strings are being displayed. I'm just getting blanks instead. Something else changed in how that needs to be initialized? - amet - 2010-06-09 highlandsun Wrote:Thanks, that helped. Now it's pretty much working, but none of my plugin's localized strings are being displayed. I'm just getting blanks instead. Something else changed in how that needs to be initialized? to have the localized strings you have to Code: import xbmcaddon |