From 48911cb511b571207fab2e1b6f6fc30c35581daf Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Mon, 21 Jan 2019 08:30:53 -0600 Subject: [PATCH] Add option to enable/disable service --- resources/language/resource.language.en_gb/strings.po | 8 ++++++++ resources/settings.xml | 7 ++++--- service.py | 5 +++++ 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/resources/language/resource.language.en_gb/strings.po b/resources/language/resource.language.en_gb/strings.po index 6a02bccd..801f1443 100644 --- a/resources/language/resource.language.en_gb/strings.po +++ b/resources/language/resource.language.en_gb/strings.po @@ -945,3 +945,11 @@ msgstr "" msgctxt "#33194" msgid "Manage libraries" msgstr "" + +msgctxt "#33195" +msgid "Enable Emby for Kodi" +msgstr "" + +msgctxt "#33196" +msgid "Advanced options" +msgstr "" diff --git a/resources/settings.xml b/resources/settings.xml index 639f6269..27853e48 100644 --- a/resources/settings.xml +++ b/resources/settings.xml @@ -92,12 +92,13 @@ - - + + - + + diff --git a/service.py b/service.py index 8f6c7dd6..7075b105 100644 --- a/service.py +++ b/service.py @@ -78,6 +78,11 @@ if __name__ == "__main__": while True: + if not settings('enableAddon.bool'): + LOG.warn("Emby for Kodi is not enabled.") + + break + try: session = ServiceManager() session.start()