From 41cc09e1a7226639f32a30b9cc1f9655cc913bff Mon Sep 17 00:00:00 2001 From: Snapcase Date: Sun, 6 Oct 2019 13:28:54 -0400 Subject: [PATCH] Add option to disable connection message --- script.service.hue/addon.xml | 2 +- .../resources/language/resource.language.en_GB/strings.po | 5 +++++ script.service.hue/resources/lib/core.py | 2 +- script.service.hue/resources/lib/globals.py | 1 + script.service.hue/resources/lib/kodiHue.py | 3 +++ script.service.hue/resources/settings.xml | 2 ++ 6 files changed, 13 insertions(+), 2 deletions(-) diff --git a/script.service.hue/addon.xml b/script.service.hue/addon.xml index f1852628..656a3963 100644 --- a/script.service.hue/addon.xml +++ b/script.service.hue/addon.xml @@ -1,4 +1,4 @@ - + diff --git a/script.service.hue/resources/language/resource.language.en_GB/strings.po b/script.service.hue/resources/language/resource.language.en_GB/strings.po index 4686d56c..5f0416bb 100644 --- a/script.service.hue/resources/language/resource.language.en_GB/strings.po +++ b/script.service.hue/resources/language/resource.language.en_GB/strings.po @@ -451,6 +451,11 @@ msgid "Maximum Brightness" msgstr "Maximum Brightness" +msgctxt "#30812" +msgid "Disable connection message" +msgstr "Disable connection message" + + msgctxt "#30069" msgid "Recommended minimum update interval: 100ms" msgstr "" diff --git a/script.service.hue/resources/lib/core.py b/script.service.hue/resources/lib/core.py index 885a54e7..d95a0faa 100644 --- a/script.service.hue/resources/lib/core.py +++ b/script.service.hue/resources/lib/core.py @@ -86,7 +86,7 @@ def service(): monitor = kodiHue.HueMonitor() - bridge = kodiHue.connectBridge(monitor,silent=False) + bridge = kodiHue.connectBridge(monitor,silent=globals.disableConnectionMessage) if bridge is not None: globals.settingsChanged = False diff --git a/script.service.hue/resources/lib/globals.py b/script.service.hue/resources/lib/globals.py index a8aef32f..4927183e 100644 --- a/script.service.hue/resources/lib/globals.py +++ b/script.service.hue/resources/lib/globals.py @@ -32,6 +32,7 @@ enableSchedule = False performanceLogging = False ambiEnabled = False +connectionMessage = False videoMinimumDuration = 0 video_enableMovie = True diff --git a/script.service.hue/resources/lib/kodiHue.py b/script.service.hue/resources/lib/kodiHue.py index 82ccd9f0..c4e1ddd9 100644 --- a/script.service.hue/resources/lib/kodiHue.py +++ b/script.service.hue/resources/lib/kodiHue.py @@ -30,6 +30,9 @@ def loadSettings(): globals.startTime = globals.ADDON.getSetting("startTime") #string HH:MM globals.endTime = globals.ADDON.getSetting("endTime") #string HH:MM globals.performanceLogging = globals.ADDON.getSettingBool("performanceLogging") + globals.disableConnectionMessage = globals.ADDON.getSettingBool("disableConnectionMessage") + + globals.videoMinimumDuration = globals.ADDON.getSettingInt("video_MinimumDuration") #Setting in Minutes. Kodi library uses seconds, needs to be converted. globals.video_enableMovie = globals.ADDON.getSettingBool("video_Movie") diff --git a/script.service.hue/resources/settings.xml b/script.service.hue/resources/settings.xml index 605631f8..4bd82e7b 100644 --- a/script.service.hue/resources/settings.xml +++ b/script.service.hue/resources/settings.xml @@ -116,6 +116,8 @@ + +