Kodi Community Forum

Full Version: Gotham Plugin Load Failure
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi All,

I have a problem when a user runs the TvTunes latest code on Gotham. It is to do with the new addition of "plugin support" to browse themes. The addon.xml now has:

Code:
    <extension point="xbmc.python.script" library="default.py">
        <provides>executable</provides>
    </extension>
    <extension point="xbmc.python.pluginsource" library="plugin.py">
        <provides>video</provides>
    </extension>

To run as both a script and a plugin. On Frodo, this runs fine and going to Video->Add-on->TvTunes will load as expected, however when running on Gotham it flashes the addon page 3 times then displays the error window with the message:

Code:
Could not connect to network server

Which is also displayed 3 times.

The error log can be viewed:

http://www.xbmclogs.com/show.php?id=178287

The code for the plugin is:

https://code.google.com/p/robwebset/sour.../plugin.py

Does anyone have any ideas?

Thanks

Rob
Question: Is Gotham actually trying to run both the default.py and plugin.py scripts - when it should really only run the plugin.py script if being called as a plugin?

Removing the default.py appears to improve the situation.

Is this a known Gotham bug? (This approach works fine on Frodo)

Thanks

Rob
I can now reproduce this with several different plugins. (Sonos is another example - and The VideoExtras Beta).

It is when there is multiple extension points set in a single addon.xml file.

Note: Also posted a link on the Gotham Beta thread:

http://forum.xbmc.org/showthread.php?tid...pid1689569
The problem is how should XBMC know which one to run? I can fix the plugin one, as that's obvious, but how should XBMC know that you want to run this as a script instead of a plugin when it's started from the skin?

e.g. https://github.com/xbmc/xbmc/pull/4598

i.e. How is it being started from the skin?

EDIT: NM, tested with Confluence and it works as expected.
(2014-04-25, 07:26)jmarshall Wrote: [ -> ]The problem is how should XBMC know which one to run? I can fix the plugin one, as that's obvious, but how should XBMC know that you want to run this as a script instead of a plugin when it's started from the skin?

e.g. https://github.com/xbmc/xbmc/pull/4598

i.e. How is it being started from the skin?

Isn't that what the "point=" attribute of the extension element is for?

http://wiki.xbmc.org/index.php?title=Add...tension.3E

So if called from the plugin/addon section it calls what is set under "xbmc.python.pluginsource".

If it is called from the skin it will use one of the built in methods, i.e.:

Code:
XBMC.RunScript(script.tvtunes,backend=True)

So as the call is RunScript - it runs the value defined in "xbmc.python.script". I guess the "RunPlugin" would run the value of "xbmc.python.pluginsource"?

I suppose as a minimum it should work in the same way as Frodo?

I hope this makes sense.

Rob
RunScript() makes no assumption about the type of add-on you want to run. ATM it works for you due to it hitting the first extension point which happens to be the one you want. If you change the order you'll find that RunScript() will run the plugin (and similarly, the plugin will "work" again).

RunAddon() specifically looks for a plugin and if found, will run that. If not found it'll call RunScript() which will take whatever comes first.

i.e. Frodo behaviour will be what we have if the above PR is merged.
Thanks, as long as there is a way to get it running like it does in Frodo, then I'm happy Big Grin

Rob