mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-12 17:27:51 -06:00
STAR-322: Testing cloud printing
This commit is contained in:
parent
d482924ea2
commit
bfd236dae4
9 changed files with 129 additions and 37 deletions
|
@ -92,7 +92,7 @@ class CloudApiClient(NetworkClient):
|
|||
# \param job_id: The ID of the print job.
|
||||
# \param on_finished: The function to be called after the result is parsed.
|
||||
def requestPrint(self, cluster_id: str, job_id: str, on_finished: Callable[[CloudPrintResponse], any]) -> None:
|
||||
url = "{}/cluster/{}/print/{}".format(self.CLUSTER_API_ROOT, cluster_id, job_id)
|
||||
url = "{}/clusters/{}/print/{}".format(self.CLUSTER_API_ROOT, cluster_id, job_id)
|
||||
self.post(url, data = "", on_finished=self._wrapCallback(on_finished, CloudPrintResponse))
|
||||
|
||||
## We override _createEmptyRequest in order to add the user credentials.
|
||||
|
|
|
@ -217,7 +217,7 @@ class CloudOutputDevice(NetworkedPrinterOutputDevice):
|
|||
printer.updateOutputModel(model)
|
||||
|
||||
# Always have an active printer
|
||||
if not self._active_printer:
|
||||
if self._printers and not self._active_printer:
|
||||
self.setActivePrinter(self._printers[0])
|
||||
|
||||
self.printersChanged.emit() # TODO: Make this more efficient by not updating every request
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue