Example #1
0
def main():
    logging.basicConfig(level=logging.DEBUG, stream=sys.stdout, format="%(asctime)s [%(levelname)8s] %(message)s")

    settings.load("settings.dat")
    if not settings.myplex_token:
        while True:
            username = raw_input("MyPlex Username: "******"MyPlex Password: "******"Logged in!"
                break
            print "Error logging in..."

    settings.add_listener(update_gdm_settings)
    
    update_gdm_settings()
    gdm.start_all()

    log.info("Started GDM service")

    queue = Queue.Queue()

    while not gdm.discovery_complete:
        time.sleep(1)

    gdm.discover()

    osd.start()

    server = HttpServer(queue, int(settings.http_port))
    server.start()

    timelineManager.start()

    try:
        while True:
            time.sleep(1)
    except KeyboardInterrupt:
        print ""
        log.info("Stopping services...")
    finally:
        playerManager.stop()
        osd.stop()
        server.stop()
        timelineManager.stop()
        gdm.stop_all()
Example #2
0
    def stop(self, path, arguments):
        playerManager.stop()

        timelineManager.SendTimelineToSubscribers()