From 7e3088ae1d5ee89ef8a4b949cb11025e75b977e6 Mon Sep 17 00:00:00 2001 From: j Date: Thu, 12 Oct 2023 12:29:02 +0100 Subject: [PATCH] fix port parsing --- cdoseaplay/sync.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cdoseaplay/sync.py b/cdoseaplay/sync.py index 454b7da..6795b92 100755 --- a/cdoseaplay/sync.py +++ b/cdoseaplay/sync.py @@ -92,7 +92,7 @@ class Player(Thread): def ping(self): data = 'NEXT' - if ':' in self.peer: + if ':' in self.peer[0]: sock = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM) else: sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) @@ -108,7 +108,7 @@ class Player(Thread): def get_position(self): try: - if ':' in self.peer: + if ':' in self.peer[0]: sock = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM) else: sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)