Merge branch 'CURA-7437_no_internet_cloud_bugs' of github.com:Ultimaker/Cura

This commit is contained in:
Jaime van Kessel 2020-06-09 13:45:21 +02:00
commit b6b3646f32
No known key found for this signature in database
GPG key ID: 3710727397403C91
4 changed files with 10 additions and 3 deletions

View file

@ -74,7 +74,7 @@ class CloudOutputDevice(UltimakerNetworkedPrinterOutputDevice):
b"name": cluster.friendly_name.encode() if cluster.friendly_name else b"",
b"firmware_version": cluster.host_version.encode() if cluster.host_version else b"",
b"printer_type": cluster.printer_type.encode() if cluster.printer_type else b"",
b"cluster_size": b"1" # cloud devices are always clusters of at least one
b"cluster_size": str(cluster.printer_count).encode() if cluster.printer_count else b"1"
}
super().__init__(

View file

@ -268,6 +268,7 @@ class CloudOutputDeviceManager:
machine.setName(device.name)
machine.setMetaDataEntry(self.META_CLUSTER_ID, device.key)
machine.setMetaDataEntry("group_name", device.name)
machine.setMetaDataEntry("group_size", device.clusterSize)
machine.setMetaDataEntry("removal_warning", self.I18N_CATALOG.i18nc(
"@label ({} is printer name)",
"{} will be removed until the next account sync. <br> To remove {} permanently, "