import os
import xbmc
from quasar.logger import log
from quasar.osarch import PLATFORM
from quasar.addon import ADDON_NAME, ADDON


def notify(message='', header=None, time=5000, image=''):
    if header is None:
        header = ADDON_NAME
    return xbmc.executebuiltin('Notification("%s", "%s", "%d", "%s")' %
                               (header, message, time, image))

def GetLocalizedString(label):
    try:
        return ADDON.getLocalizedString(int(label[9:-1])).encode('utf-8')
    except:
        return label

def system_information():
    build = xbmc.getInfoLabel("System.BuildVersion")
    log.info("System information: %(os)s_%(arch)s %(version)s" % PLATFORM)
    log.info("Kodi build version: %s" % build)
    log.info("OS type: %s" % os.name)
    log.info("uname: %s" % repr(os.uname()))
    return PLATFORM

import platform
import xbmc
from quasar.logger import log
from quasar.osarch import PLATFORM
from quasar.addon import ADDON_NAME, ADDON


def notify(message='', header=None, time=5000, image=''):
    if header is None:
        header = ADDON_NAME
    return xbmc.executebuiltin('Notification("%s", "%s", "%d", "%s")' %
                               (header, message, time, image))

def GetLocalizedString(label):
    try:
        return ADDON.getLocalizedString(int(label[9:-1])).encode('utf-8')
    except:
        return label

def system_information():
    build = xbmc.getInfoLabel("System.BuildVersion")
    log.info("System information: %(os)s_%(arch)s %(version)s" % PLATFORM)
    log.info("Kodi build version: %s" % build)
    log.info("OS type: %s" % platform.system())
    log.info("uname: %s" % repr(platform.uname()))
    return PLATFORM

use platform module in util.system_information