listen on IPv6

This commit is contained in:
j 2023-10-12 12:50:05 +01:00
parent 4e6a8d03f6
commit a117cad720

View file

@ -150,7 +150,8 @@ def main():
player = get_player(fullscreen=not args.window) 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.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)