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