Accessing another addons code?
#1
Is there a recommended way of accessing another addons functionality or would I need to copy their code into my addon? For example, I'd like to use the Jdownloader addon to send files to Jdownloader or TVRage addon to get info on shows users configured with it.
Reply
#2
use the execbuiltin and submit a runplugin/RunScript with the appropriate params. it that doesn't cut it, you can alternatively split the add-ons you want to use (obviously have to get the original authors on board) in a script.module and a plugin/script. that way you can use the script.module.
Reply
#3
hum!

you mean if script addon.xml contains script.module we just have to import it and we will be able to load the py file pointed default=foo.py ?
Reply
#4
no, script.module puts a lib in the library path. you can then 'import foo' like you do with "normal" python modules/libraries. see how e.g. simplejson is used.
Reply
#5
yes, that's what i was meaning, sorry :§
Reply
#6
Thanks spiff. script.module is the cleaner way to go.
Reply
#7
I am curious about the script.module. If someone install an addons requesting a script.module, is the user will be presented he as to install this module?
I tried something like that with a addons script using script.module.beautifulsoup without having script.module.beautifulsoup installed.
when I ran the addons, I have just got an error, but wasn't presented to install the missing script.module.beautifulsoup.

What is the expected behavior?
Image
_____________________________

Repositories Installer: select and install unofficial repositories / TAC.TV: watch videos on TAC.TV
Installer Passion-XBMC: Download and Install Add-ons (pre-Dharma only)

Image
Reply
#8
deps are resolved on installation. either from a zip or from a repo. if you just copy files there manually and try to add the dep it won't be resolved. they are silently installed since from a users perspective they couldn't care less.
Reply
#9
spiff Wrote:deps are resolved on installation. either from a zip or from a repo. if you just copy files there manually and try to add the dep it won't be resolved. they are silently installed since from a users perspective they couldn't care less.
Ok that's make sense now. Thank you for your quick answer.
Image
_____________________________

Repositories Installer: select and install unofficial repositories / TAC.TV: watch videos on TAC.TV
Installer Passion-XBMC: Download and Install Add-ons (pre-Dharma only)

Image
Reply

Logout Mark Read Team Forum Stats Members Help
Accessing another addons code?0