Compare commits
2 commits
872341bec0
...
a117cad720
Author | SHA1 | Date | |
---|---|---|---|
a117cad720 | |||
4e6a8d03f6 |
1 changed files with 4 additions and 4 deletions
|
@ -45,6 +45,7 @@ class Handler(BaseRequestHandler):
|
|||
response = b'WAITING'
|
||||
queue = True
|
||||
socket = self.request[1]
|
||||
logger.debug("respond to %s: %s", self.client_address[0], response)
|
||||
socket.sendto(response, self.client_address)
|
||||
if queue:
|
||||
self.server.player.queue.put('')
|
||||
|
@ -140,8 +141,6 @@ def main():
|
|||
|
||||
peer = (args.peer, args.peer_port)
|
||||
|
||||
time.sleep(10)
|
||||
|
||||
DEBUG = args.debug
|
||||
if DEBUG:
|
||||
log_format = '%(asctime)s:%(levelname)s:%(name)s:%(message)s'
|
||||
|
@ -151,7 +150,8 @@ def main():
|
|||
|
||||
player = get_player(fullscreen=not args.window)
|
||||
|
||||
server = ThreadingUDPServer(('0.0.0.0', args.port), Handler)
|
||||
listen = '::' if ':' in args.peer else ''0.0.0.0''
|
||||
server = ThreadingUDPServer((listen, args.port), Handler)
|
||||
server.allow_reuse_address = True
|
||||
server.player = Player(peer, player, args.playlist, args.prefix)
|
||||
player.register_key_binding('q', server.q_binding)
|
||||
|
|
Loading…
Reference in a new issue