diff --git a/octoprint_reservations/main.py b/octoprint_reservations/main.py index 70f2cce..45074e3 100755 --- a/octoprint_reservations/main.py +++ b/octoprint_reservations/main.py @@ -18,7 +18,10 @@ def get_printer_job(calendar, printer): print(f"Failed to get current job for {printer['name']}: {e}") return - if current_job["state"] == "Printing": + if ( + current_job["state"] == "Printing" + and current_job["progress"]["printTimeLeft"] is not None + ): now = datetime.utcnow() start = now - timedelta(seconds=current_job["progress"]["printTime"]) estimated_end = now + timedelta(