Kodi Community Forum
How to pass the value to another addon? - 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: How to pass the value to another addon? (/showthread.php?tid=174852)



How to pass the value to another addon? - directer - 2013-10-03

Due to i develop the three plugin such as video, music and picture. It must to login in three part. Is it possible that i login at one and the another can receive the value.


RE: How to pass the value to another addon? - spiff - 2013-10-03

you can instance xbmc.Addon for anything in your plugin. decide where to put the value (as a setting) then just have em all read/write it to that common one..


RE: How to pass the value to another addon? - directer - 2013-10-03

Sorry, i did not understand, if i need to change username as i must to setting into three add-on??


RE: How to pass the value to another addon? - Roman_V_M - 2013-10-03

(2013-10-03, 13:22)directer Wrote: Sorry, i did not understand, if i need to change username as i must to setting into three add-on??

I guess, what spiff means is that you can read another addon's settings from your addon:

PHP Code:
_ANOTHER_ADDON_ID 'your.another.addon'
_another_addon xbmcaddon.Addon(id='_ANOTHER_ADDON_ID')
another_addon_setting _another_addon.getSetting('setting'