From 6559939fc4672bd7025ebef35e32fc1c523249fa Mon Sep 17 00:00:00 2001 From: j Date: Thu, 12 Oct 2023 12:57:18 +0100 Subject: [PATCH] ipv6 is complicated --- cdoseaplay/sync.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cdoseaplay/sync.py b/cdoseaplay/sync.py index e81d796..e2407d2 100755 --- a/cdoseaplay/sync.py +++ b/cdoseaplay/sync.py @@ -149,8 +149,12 @@ def main(): os.chdir(base) player = get_player(fullscreen=not args.window) - - listen = '::' if ':' in args.peer else '0.0.0.0' + + if ':' in args.peer: + listen = '::' + ThreadingUDPServer.address_family = socket.AF_INET6 + else: + listen = '0.0.0.0' server = ThreadingUDPServer((listen, args.port), Handler) server.allow_reuse_address = True server.player = Player(peer, player, args.playlist, args.prefix)