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
This commit is contained in:
David Francos 2020-09-17 10:29:53 +02:00
parent 8ebee6e6de
commit cf1ee30e18
1 changed files with 2 additions and 1 deletions

View File

@ -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):