From 475a671d0805761976dde01bf242bd22ef925230 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Mon, 24 Aug 2015 02:39:19 -0500 Subject: [PATCH] Set central window property Always have the latest properties and will clean up the code. Will centralize the rest of the code a bit later. --- resources/lib/Utils.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/resources/lib/Utils.py b/resources/lib/Utils.py index 4119f9de..702436e9 100644 --- a/resources/lib/Utils.py +++ b/resources/lib/Utils.py @@ -269,6 +269,16 @@ def settings(setting, value = None): else: return addon.getSetting(setting) +def window(property, value = None, clear = False): + # Get or set window property + WINDOW = xbmcgui.Window(10000) + if clear: + WINDOW.clearProperty(property) + elif value: + WINDOW.setProperty(property, value) + else: + return WINDOW.getProperty(property) + def normalize_string(text): # For theme media, do not modify unless # modified in TV Tunes