From 9135b74484a60257ed8b89447deee73961da6c7d Mon Sep 17 00:00:00 2001 From: YoursFunny Date: Mon, 6 Jul 2026 19:37:24 +0800 Subject: [PATCH] fix: handle copy-pasted serial 5555,16384 to be fool-proof --- module/device/connection_attr.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/module/device/connection_attr.py b/module/device/connection_attr.py index 43a6c7c..69dc371 100644 --- a/module/device/connection_attr.py +++ b/module/device/connection_attr.py @@ -57,6 +57,12 @@ class ConnectionAttr: serial = serial.replace('。', '.').replace(',', '.').replace(',', '.').replace(':', ':') # 127.0.0.1.5555 serial = serial.replace('127.0.0.1.', '127.0.0.1:') + # Mumu12 5.0 shows double serials, some people may just copy-paste it + # 5555,16384 + if ',' in serial: + left, _, right = serial.partition(',') + if left.startswith('55') and right.startswith('16'): + serial = right # 16384 try: port = int(serial)