'Internal wrapper for the notify_snatch and notify_download functions
Detects JSON-RPC version then branches the logic for either the JSON-RPC or legacy HTTP API methods.
Args:
message: Message body of the notice to send
title: Title of the notice to send
host: KODI webserver host:port
username: KODI webserver username
password: KODI webserver password
force: Used for the Test method to override config saftey checks
Returns:
Returns a list results in the format of host:ip:result
The result will either be \'OK\' or False, this is used to be parsed by the calling function.'

def _notify_kodi(self, message, title=u'SiCKRAGE', host=None, username=None, password=None, force=False):

    if (not host):
        host = sickrage.srCore.srConfig.KODI_HOST
    if (not username):
        username = sickrage.srCore.srConfig.KODI_USERNAME
    if (not password):
        password = sickrage.srCore.srConfig.KODI_PASSWORD
    if ((not sickrage.srCore.srConfig.USE_KODI) and (not force)):
        sickrage.srCore.srLogger.debug(u'Notification    for    KODI    not    enabled,    skipping    this    notification')
        return False
    result = u''
    for curHost in [x.strip() for x in host.split(u',')]:
        sickrage.srCore.srLogger.debug((((u"Sending    KODI    notification    to    '" + curHost) + u"'    -    ") + message))
        kodiapi = self._get_kodi_version(curHost, username, password)
        if kodiapi:
            if (kodiapi <= 4):
                sickrage.srCore.srLogger.debug(u'Detected    KODI    version    <=    11,    using    KODI    HTTP    API')
                command = {u'command': u'ExecBuiltIn', u'parameter': ((((u'Notification(' + title.encode(u'utf-8')) + u',') + message.encode(u'utf-8')) + u')')}
                notifyResult = self._send_to_kodi(command, curHost, username, password)
                if notifyResult:
                    result += ((curHost + u':') + str(notifyResult))
            else:
                sickrage.srCore.srLogger.debug(u'Detected    KODI    version    >=    12,    using    KODI    JSON    API')
                command = (u'{"jsonrpc":"2.0","method":"GUI.ShowNotification","params":{"title":"%s","message":"%s",    "image":    "%s"},"id":1}' % (title.encode(u'utf-8'), message.encode(u'utf-8'), self.sr_logo_url))
                notifyResult = self._send_to_kodi_json(command, curHost, username, password)
                if (notifyResult and notifyResult.get(u'result')):
                    result += ((curHost + u':') + notifyResult[u'result'].decode(sickrage.SYS_ENCODING))
        else:
            if (sickrage.srCore.srConfig.KODI_ALWAYS_ON or force):
                sickrage.srCore.srLogger.warning(((u"Failed    to    detect    KODI    version    for    '" + curHost) + u"',    check    configuration    and    try    again."))
            result += (curHost + u':False')
    return result
