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: 26,228
Joined: Oct 2003
Reputation: 177
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: 26,228
Joined: Oct 2003
Reputation: 177
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: 26,228
Joined: Oct 2003
Reputation: 177
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,711
Joined: Feb 2009
Reputation: 11
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
jmarshall Offline
Team-XBMC Developer
Posts: 26,228
Joined: Oct 2003
Reputation: 177
Post: #11
The docs may be out of date - check the code in SVN.

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
FrostBox Offline
Skilled Python Coder
Posts: 100
Joined: Nov 2005
Reputation: 6
Location: Quebec City
Post: #12
mindweaver Wrote:They seem to use the old description.xml and not the newer addon.xml

hi, check revision 765 and 766
http://code.google.com/p/passion-xbmc/so...tail?r=765

plugin.video.astral.media
script.calculator
and my game script.game.arkanoid

work great Nod

cheers
frost

For my bad English, sorry. I am French Canadian.
Admin @ Passion-XBMC.org
find quote
mindweaver Offline
Posting Freak
Posts: 998
Joined: Jan 2004
Reputation: 1
Location: Sweden
Post: #13
FrostBox Wrote:hi, check revision 765 and 766
http://code.google.com/p/passion-xbmc/so...tail?r=765

plugin.video.astral.media
script.calculator
and my game script.game.arkanoid

work great Nod

cheers
frost

Thank you for the suggestions. See that you call getSetting with an integer. what does "sys.argv[1]" mean?

Code:
xbmcplugin.getSetting( int( sys.argv[ 1 ] ), "DlPath" ), "" )

if you really are "Skilled Python Coder" can't you take a look at the AMT plugin and see if you can get it to work? Would be awesome. It worked fine in builds before 28274.

http://tillytech.se/plugin.amtlite.rar
(This post was last modified: 2010-05-26 17:24 by mindweaver.)
find quote
theophile Offline
Fan
Posts: 569
Joined: Jan 2009
Reputation: 30
Post: #14
I'm wondering the same thing. I grabbed the Astral Media plugin from svn, putting it in /usr/share/xbmc/addons/plugin.video.astral.media/
Even after restarting XBMC, it does not appear in the addons list nor in the video plugins list (which is empty). I am using XBMC build 30704.

I've managed to "hack" in a couple skins by creating the necessary addon.xml file and I'm trying to do the same for a couple video plugins. I've read that it's possible. What am I doing wrong?
find quote
Basje Offline
Skilled Python Coder
Posts: 1,092
Joined: Jul 2005
Reputation: 6
Post: #15
I have the following issue:

I added an addon.xml to my existing script. It now appears in XBMC, but I now get the error:
Code:
18:17:20 T:5308 M:1288683520  NOTICE: Traceback (most recent call last):
18:17:20 T:5308 M:1288683520  NOTICE:   File "D:\XBMC\XBMC_PC\addons\net.rieter.xot\default.py", line 142, in ?
18:17:20 T:5308 M:1288683520  NOTICE:     MyWindow = progwindow.GUI(config.appSkin ,config.rootDir, config.skinFolder)
18:17:20 T:5308 M:1288683520  NOTICE: TypeError: XML File for Window is missing
18:17:20 T:5308 M:1288704000    INFO: Scriptresult: Success
Where the progwindow.GUI(config.appSkin ,config.rootDir, config.skinFolder) is the WindowXML class. The first parameter is the XML file for the skin. The second on the rootdir of the script and the last one the skin name.

Any clues? I tried some of the http://code.google.com/p/passion-xbmc/source script addons, but they give the same error?

find quote