simplyprint: automated file reset bugfix

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Eric Callahan 2022-08-28 12:42:54 -04:00
parent 7f2d43de3d
commit d04e99a8ec
No known key found for this signature in database
GPG Key ID: 5A1EB336DFB4C71B
1 changed files with 2 additions and 1 deletions

View File

@ -1489,6 +1489,7 @@ class PrintHandler:
self.pending_file = fpath.name
if ret.get("print_started", False):
state = "started"
self.last_started = self.pending_file
self.pending_file = ""
elif not start and await self._check_can_print():
state = "ready"
@ -1524,7 +1525,7 @@ class PrintHandler:
data["state"] = "error"
data["message"] = "Failed to start print"
else:
self._last_started = pending
self.last_started = pending
self.simplyprint.send_sp("file_progress", data)
async def _check_can_print(self) -> bool: