simplyprint: automated file reset bugfix
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
7f2d43de3d
commit
d04e99a8ec
|
@ -1489,6 +1489,7 @@ class PrintHandler:
|
||||||
self.pending_file = fpath.name
|
self.pending_file = fpath.name
|
||||||
if ret.get("print_started", False):
|
if ret.get("print_started", False):
|
||||||
state = "started"
|
state = "started"
|
||||||
|
self.last_started = self.pending_file
|
||||||
self.pending_file = ""
|
self.pending_file = ""
|
||||||
elif not start and await self._check_can_print():
|
elif not start and await self._check_can_print():
|
||||||
state = "ready"
|
state = "ready"
|
||||||
|
@ -1524,7 +1525,7 @@ class PrintHandler:
|
||||||
data["state"] = "error"
|
data["state"] = "error"
|
||||||
data["message"] = "Failed to start print"
|
data["message"] = "Failed to start print"
|
||||||
else:
|
else:
|
||||||
self._last_started = pending
|
self.last_started = pending
|
||||||
self.simplyprint.send_sp("file_progress", data)
|
self.simplyprint.send_sp("file_progress", data)
|
||||||
|
|
||||||
async def _check_can_print(self) -> bool:
|
async def _check_can_print(self) -> bool:
|
||||||
|
|
Loading…
Reference in New Issue