Beispiel #1
0
def run():
    # Make sure the XBMC jsonrpc server is started.
    xbmc.startServer(xbmc.SERVER_JSONRPCSERVER, True)

    # Make the monitor
    monitor = ElementumMonitor()

    threads = [
        threading.Thread(target=server_thread),  # JSONRPC thread
    ]
    if not ONLY_CLIENT and PLATFORM["fork"]:
        threads.append(
            threading.Thread(target=elementumd_thread,
                             args=[monitor]))  # Elementumd thread

    for t in threads:
        t.daemon = True
        t.start()

    # XBMC loop
    while not monitor.abortRequested():
        xbmc.sleep(1000)

    if PLATFORM['kodi'] >= 19:
        monitor.onAbortRequested()

    log.info("elementum: exiting elementumd")
Beispiel #2
0
def run():
    # Make sure the XBMC jsonrpc server is started.
    xbmc.startServer(xbmc.SERVER_JSONRPCSERVER, True)

    # Make the monitor
    monitor = ElementumMonitor()

    threads = [
        threading.Thread(target=server_thread),  # JSONRPC thread
    ]
    if not ONLY_CLIENT:
        sys.stderr.write("elementum: ONLY " + str(ONLY_CLIENT))
        threads.append(
            threading.Thread(target=elementumd_thread,
                             args=[monitor]))  # Elementumd thread

    for t in threads:
        t.daemon = True
        t.start()

    # XBMC loop
    while not xbmc.abortRequested:
        xbmc.sleep(1000)

    log.info("elementum: exiting elementumd")
Beispiel #3
0
def run():
    # Make sure the XBMC jsonrpc server is started.
    xbmc.startServer(xbmc.SERVER_JSONRPCSERVER, True)

    # Make the monitor
    monitor = ElementumMonitor()

    threads = [
        threading.Thread(target=server_thread),  # JSONRPC thread
        threading.Thread(target=elementumd_thread,
                         args=[monitor]),  # Elementumd thread
    ]
    for t in threads:
        t.daemon = True
        t.start()

    # XBMC loop
    while not xbmc.abortRequested:
        xbmc.sleep(1000)

    log.info("elementum: exiting elementumd")