From a54299bbd00203043d157023899d70d329da087f Mon Sep 17 00:00:00 2001 From: Shaun Date: Wed, 1 Jan 2020 11:10:54 +1100 Subject: [PATCH] notify when debig loggin is enabled --- service.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/service.py b/service.py index 601412b..fa6c27e 100644 --- a/service.py +++ b/service.py @@ -6,6 +6,7 @@ import traceback import xbmc import xbmcaddon +import xbmcgui from resources.lib.downloadutils import DownloadUtils, save_user_details from resources.lib.simple_logging import SimpleLogging @@ -101,6 +102,13 @@ newcontent_interval = int(settings.getSetting('new_content_check_interval')) random_movie_list_interval = int(settings.getSetting('random_movie_refresh_interval')) random_movie_list_interval = random_movie_list_interval * 60 +enable_logging = settings.getSetting('log_debug') == "true" +if enable_logging: + xbmcgui.Dialog().notification(settings.getAddonInfo('name'), + "Debug logging enabled!", + time=8000, + icon=xbmcgui.NOTIFICATION_WARNING) + # monitor.abortRequested() is causes issues, it currently triggers for all addon cancelations which causes # the service to exit when a user cancels an addon load action. This is a bug in Kodi. # I am switching back to xbmc.abortRequested approach until kodi is fixed or I find a work arround