Ejemplo n.º 1
0
def sigtermhandler(signum, frame):
    # shutdown all running threads
    hub.notify(events.quit(), 100)
Ejemplo n.º 2
0
    if config.network.enableserver:
        import network
        network.tcpserver(config.network.bind, config.network.port).start()
    if config.network.socketfile:
        import network
        network.unixserver(os.path.expanduser(config.network.socketfile)).start()

    # Now that the basic services have been started, we can initialize
    # the players. This has to be done last because the players
    # immediately start requesting a new song
    playerids = [services.player.initplayer("main", config.player.main),
                 services.player.initplayer("secondary", config.player.secondary)]

except:
    # if something goes wrong, shutdown all already running services
    hub.notify(events.quit(), 100)
    raise

##############################################################################
# basic curses library setup...
##############################################################################

def cursessetup():
    # Initialize curses library
    stdscr = curses.initscr()

    # Turn off echoing of keys
    curses.noecho()

    # In keypad mode, escape sequences for special keys
    # (like the cursor keys) will be interpreted and
Ejemplo n.º 3
0
def sigtermhandler(signum, frame):
    # shutdown all running threads
    hub.notify(events.quit(), 100)
Ejemplo n.º 4
0
    if config.network.socketfile:
        import network
        network.unixserver(os.path.expanduser(
            config.network.socketfile)).start()

    # Now that the basic services have been started, we can initialize
    # the players. This has to be done last because the players
    # immediately start requesting a new song
    playerids = [
        services.player.initplayer("main", config.player.main),
        services.player.initplayer("secondary", config.player.secondary)
    ]

except:
    # if something goes wrong, shutdown all already running services
    hub.notify(events.quit(), 100)
    raise

##############################################################################
# basic curses library setup...
##############################################################################


def cursessetup():
    # Initialize curses library
    stdscr = curses.initscr()

    # Turn off echoing of keys
    curses.noecho()

    # In keypad mode, escape sequences for special keys
Ejemplo n.º 5
0
 def quit(self, event):
     service.service.quit(self, event)
     self.songdbhub.notify(events.quit())
Ejemplo n.º 6
0
 def quit(self, event):
     service.service.quit(self, event)
     self.songdbhub.notify(events.quit())