How does plugins work since the addon-merge?

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
mindweaver Offline
Posting Freak
Posts: 998
Joined: Jan 2004
Reputation: 1
Location: Sweden
Post: #1
Since the addon-merge how does plugins work? I see scrapers and viz added. And now also some scripts (xbmc.subtitles, recentlyadded and so on)

But I haven't seen anyone trying to get plugins in. How does the addon.xml look for a plugin? Does anyone know?
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 24,523
Joined: Oct 2003
Reputation: 138
Post: #2
Plugins aren't in yet - I hope to get them in today.

They'll use the xbmc.python.plugin extension point and otherwise be identical to scripts, using the <supportedcontent> tag in xbmc.addon.metadata in the same way as scrapers.

Cheers,
Jonathan

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
mindweaver Offline
Posting Freak
Posts: 998
Joined: Jan 2004
Reputation: 1
Location: Sweden
Post: #3
Thank you for your answer! Looking forward to testing it!
find quote
mindweaver Offline
Posting Freak
Posts: 998
Joined: Jan 2004
Reputation: 1
Location: Sweden
Post: #4
Does this look like a coorect addon.xml for a plugin? In this case the AMT Lite?

[HTML]<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.amtlite"
name="Apple Movie Trailers Lite"
version="1.0"
provider-name="Nuka1195">
<requires>
<import addon="xbmc.python" version="1.0"/>
</requires>
<extension point="xbmc.python.plugin"
library="default.py" />
<extension point="xbmc.addon.metadata">
<platform>all</platform>
<minversion>28764</minversion>
<summary lang="en">Apple Movie Trailers Lite</summary>
<description lang="en">View movie trailers from quicktime.com</description>
<supportedcontent>
<content>movies</content>
</supportedcontent>
</extension>
</addon>[/HTML]

And is it correct to call it like this:

[HTML]<onclick>XBMC.ActivateWindow(MyVideoLibrary, special://addons/plugin.amtlite/default.py,return)</onclick>[/HTML]
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 24,523
Joined: Oct 2003
Reputation: 138
Post: #5
That looks OK. You can call it directly using plugin://plugin.amtlite I should think, though ofcourse you shouldn't be assuming that the user has it installed.

Note that it'll show up in the root of your video library by default.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
mindweaver Offline
Posting Freak
Posts: 998
Joined: Jan 2004
Reputation: 1
Location: Sweden
Post: #6
jmarshall Wrote:That looks OK. You can call it directly using plugin://plugin.amtlite I should think, though ofcourse you shouldn't be assuming that the user has it installed.

that seems to do something Smile Now it actually started the plugin, but I got errors. Is it to any use for me to debug the script or isn't the plugin part added completely yet?

Code:
11:11:08 T:5448 M:283906048    INFO: -->Python script returned the following error<--
11:11:08 T:5448 M:283906048   ERROR: Error Type: exceptions.TypeError
11:11:08 T:5448 M:283906048   ERROR: Error Contents: function takes exactly 2 arguments (1 given)
11:11:08 T:2916 M:283873280    INFO: Scriptresult: Success
11:11:08 T:2916 M:283934720    INFO: Python script stopped
11:11:08 T:2916 M:283934720   DEBUG: Thread 2916 terminating
11:11:08 T:5448 M:283951104   ERROR: Traceback (most recent call last):
                                              File "C:\Users\XX XX\AppData\Roaming\XBMC\addons\plugin.amtlite\default.py", line 27, in ?
                                                plugin.Main()
                                              File "C:\Users\XX XX\AppData\Roaming\XBMC\addons\plugin.amtlite\resources\lib\trailers.py", line 267, in __init__
                                                self._get_settings()
                                              File "C:\Users\XX XX\AppData\Roaming\XBMC\addons\plugin.amtlite\resources\lib\trailers.py", line 308, in _get_settings
                                                self.PluginCategory = ( xbmc.getLocalizedString( 30800 ), xbmc.getLocalizedString( 30801 ), xbmc.getLocalizedString( 30802 ), xbmc.getLocalizedString( 30803 ), )[ int( xbmcplugin.getSetting( "trailer_quality" ) ) ]
                                            TypeError: function takes exactly 2 arguments (1 given)
11:11:08 T:5448 M:283951104    INFO: -->End of Python script error report<--

jmarshall Wrote:Note that it'll show up in the root of your video library by default.

Not really sure what you mean by that. Where exactly is it suppose to show up? Can't find it under VIDEOS.
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 24,523
Joined: Oct 2003
Reputation: 138
Post: #7
You probably want to pass the plugin ID into getSettings I think.

And it shows up in the root of you video library. No idea about files view - haven't tried it.

Cheers,
Jonathan

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
ppic Offline
Skilled Python Coder
Posts: 2,664
Joined: Feb 2009
Reputation: 10
Location: France idf
Post: #8
we've done some work on some script and plugin to test, see here : http://code.google.com/p/passion-xbmc/so...unk/addons

[Image: widget]
Passion-XBMC Repository Download your SVN skins and addons
TvTunes Addon Download Play your theme while browsing library
TVshow Next Aired display next aired infos from tvrage.com
Logo Downloader Script download Logo/clearart/show thumbs/poster/banner
Bande-Annonce Allociné plugin watch trailers in french and vo
SportLive Script Live score match info in XBMC (not compatible dharma)
find quote
mindweaver Offline
Posting Freak
Posts: 998
Joined: Jan 2004
Reputation: 1
Location: Sweden
Post: #9
ppic Wrote:we've done some work on some script and plugin to test, see here : http://code.google.com/p/passion-xbmc/so...unk/addons

They seem to use the old description.xml and not the newer addon.xml
find quote
mindweaver Offline
Posting Freak
Posts: 998
Joined: Jan 2004
Reputation: 1
Location: Sweden
Post: #10
jmarshall Wrote:You probably want to pass the plugin ID into getSettings I think.

Sorry if I'm daft. With plugin ID do you mean "plugin.amtlite". Adding that just caused TypeError: an integer is required. I guess I will have to give up and try and get Nuka1195 to get it working Smile

EDIT: http://xbmc.sourceforge.net/python-docs/xbmcplugin.html from what I can see getSetting should only take one argument.

jmarshall Wrote:And it shows up in the root of you video library. No idea about files view - haven't tried it.

Nope, nothing in video library root. But that's no biggie. I have a link to it. just want to get it working Smile too bad I've never done python coding.
(This post was last modified: 2010-05-25 11:58 by mindweaver.)
find quote
Post Reply