mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-13 05:49:01 +08:00
Add the offline cloud printers in Cura when they are discovered
CURA-7458
This commit is contained in:
parent
52a6618630
commit
5aff6218d5
@ -98,9 +98,10 @@ class CloudOutputDeviceManager:
|
|||||||
"""Callback for when the request for getting the clusters is finished."""
|
"""Callback for when the request for getting the clusters is finished."""
|
||||||
|
|
||||||
new_clusters = []
|
new_clusters = []
|
||||||
|
all_clusters = {c.cluster_id: c for c in clusters} # type: Dict[str, CloudClusterResponse]
|
||||||
online_clusters = {c.cluster_id: c for c in clusters if c.is_online} # type: Dict[str, CloudClusterResponse]
|
online_clusters = {c.cluster_id: c for c in clusters if c.is_online} # type: Dict[str, CloudClusterResponse]
|
||||||
|
|
||||||
for device_id, cluster_data in online_clusters.items():
|
for device_id, cluster_data in all_clusters.items():
|
||||||
if device_id not in self._remote_clusters:
|
if device_id not in self._remote_clusters:
|
||||||
new_clusters.append(cluster_data)
|
new_clusters.append(cluster_data)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user