0

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

Aqib Bangash
  • 963
  • 1
  • 8
  • 22

1 Answers1

1

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')

Razze
  • 4,124
  • 3
  • 16
  • 23
  • This works perfectly fine for Strings. How to save Booleans? I need to use boolean in my skin saved by a Service. – Aqib Bangash Jun 22 '17 at 03:40
  • 1
    Well as long as you control it, you can just equal a string and take that bool for whatever you want to do. I'm not aware of datatypes in the property department. – Razze Jun 25 '17 at 11:43