mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 10:16:11 +00:00
Merge pull request #398 from XayOn/feature/396-b
Fix removed log level in Kodi 19
This commit is contained in:
commit
66e8593d97
1 changed files with 8 additions and 1 deletions
|
@ -14,6 +14,7 @@ import database
|
|||
from helper import get_filesystem_encoding
|
||||
|
||||
from . import settings
|
||||
from . import kodi_version
|
||||
|
||||
##################################################################################################
|
||||
|
||||
|
@ -49,6 +50,11 @@ class LogHandler(logging.StreamHandler):
|
|||
|
||||
self.mask_info = settings('maskInfo.bool')
|
||||
|
||||
if kodi_version() > 18:
|
||||
self.level = xbmc.LOGINFO
|
||||
else:
|
||||
self.level = xbmc.LOGNOTICE
|
||||
|
||||
def emit(self, record):
|
||||
|
||||
if self._get_log_level(record.levelno):
|
||||
|
@ -61,7 +67,8 @@ class LogHandler(logging.StreamHandler):
|
|||
for token in self.sensitive['Token']:
|
||||
string = string.replace(token or "{token}", "{jellyfin-token}")
|
||||
|
||||
xbmc.log(string, level=xbmc.LOGNOTICE)
|
||||
xbmc.log(string, level=self.level)
|
||||
|
||||
|
||||
@classmethod
|
||||
def _get_log_level(cls, level):
|
||||
|
|
Loading…
Reference in a new issue