Verified Commit bab8da23 authored by Grégor JOUET's avatar Grégor JOUET 🔧
Browse files

Change printer set current print order at startup

parent 215e176e
Loading
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -481,8 +481,6 @@ class OctoPrinter(PrinterBase):
        gcode_path = os.path.join(FILE_SAVE_PATH, print_obj.gcode)
        with open(gcode_path) as fh:   

            self.printer_obj.current_print = print_obj
            self.printer_obj.save()
            self.log(f"[+] Starting print #{self.current_print.id} ({self.current_print.title})")
            self._refresh_ready_state()

@@ -508,6 +506,9 @@ class OctoPrinter(PrinterBase):
                data={"command": "select", "print": True}
            )

            self.printer_obj.current_print = print_obj
            self.printer_obj.save()
           
            print_obj.status = 3 # REQUEST_STATUS_PRINTING
            print_obj.save()
            add_request_event(print_obj, "Started Printing", None)