Save settings value accessible globally in KODI

719 Views Asked by At

I'm writing Multiple Add-ons for a personal build of KODI. What I am trying to achieve is:

  1. Service(Add-on A) will authenticate the box using its MAC Address.
  2. Service(Add-on A) will save a token(T1).
  3. Service(Add-on B) will use T1 and load movies if (T1 != None)

BUT xbmcplugin.setSetting( "token" ) AND xbmcplugin.getSetting( "token" ) saves the value in the context of Add-on where it was called.

HOW to achieve Saving Global Values in KODI with Python

1

There are 1 best solutions below

2
Razze On BEST ANSWER

You can use window properties for that. Window 10000 is one of the main windows so it will always exist.

Set it xbmcgui.Window(10000).setProperty('myProperty', 'myValue')

Read it xbmcgui.Window(10000).getProperty('myProperty')