From cf1ee30e1832ec620ddc250372ebad276fdf05f1 Mon Sep 17 00:00:00 2001 From: David Francos Date: Thu, 17 Sep 2020 10:29:53 +0200 Subject: [PATCH] fix: #396 Brough back kodi 18 lognotice compat. Kodi 18 seems to not log LOGINFO messages, this approach uses LOGNOTICE if its available and LOGINFO otherwise, ensuring compatibility without needing to check for kodi versions --- jellyfin_kodi/helper/loghandler.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jellyfin_kodi/helper/loghandler.py b/jellyfin_kodi/helper/loghandler.py index 86200632..a9949f94 100644 --- a/jellyfin_kodi/helper/loghandler.py +++ b/jellyfin_kodi/helper/loghandler.py @@ -61,7 +61,8 @@ class LogHandler(logging.StreamHandler): for token in self.sensitive['Token']: string = string.replace(token or "{token}", "{jellyfin-token}") - xbmc.log(string, level=xbmc.LOGINFO) + xbmc.log(string, level=getattr(xbmc, 'LOGNOTICE', xbmc.LOGINFO)) + @classmethod def _get_log_level(cls, level):