From c5e9acf66417c64c8fd60a803940a9df0c9f5b1c Mon Sep 17 00:00:00 2001 From: Aleksei S Date: Thu, 3 May 2018 17:14:56 +0200 Subject: [PATCH] Fix: Manually added printer by ip address shows proper printer type CURA-5264 --- plugins/UM3NetworkPrinting/UM3OutputDevicePlugin.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/UM3NetworkPrinting/UM3OutputDevicePlugin.py b/plugins/UM3NetworkPrinting/UM3OutputDevicePlugin.py index 5a0d5fa275..2add388db6 100644 --- a/plugins/UM3NetworkPrinting/UM3OutputDevicePlugin.py +++ b/plugins/UM3NetworkPrinting/UM3OutputDevicePlugin.py @@ -189,10 +189,14 @@ class UM3OutputDevicePlugin(OutputDevicePlugin): b"name": system_info["name"].encode("utf-8"), b"address": address.encode("utf-8"), b"firmware_version": system_info["firmware"].encode("utf-8"), - b"manual": b"true", - b"machine": system_info["variant"].encode("utf-8") + b"manual": b"true" } + if "hardware" in system_info and 'typeid' in system_info["hardware"]: + properties[b"machine"] = str(system_info['hardware']["typeid"]).encode("utf-8") + else: + properties[b"machine"] = system_info["variant"].encode("utf-8") + if has_cluster_capable_firmware: # Cluster needs an additional request, before it's completed. properties[b"incomplete"] = b"true"