From 89fa9ba47efe65642347b5896b94d95c844259b4 Mon Sep 17 00:00:00 2001 From: Arksine Date: Fri, 31 Jul 2020 15:35:07 -0400 Subject: [PATCH] gcode_apis: update "print start" API to use SDCARD_PRINT_FILE gcode Signed-off-by: Eric Callahan --- moonraker/plugins/gcode_apis.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/moonraker/plugins/gcode_apis.py b/moonraker/plugins/gcode_apis.py index 01115ed..197d38c 100644 --- a/moonraker/plugins/gcode_apis.py +++ b/moonraker/plugins/gcode_apis.py @@ -52,9 +52,9 @@ class GCodeAPIs: filename = args.get('filename') # XXX - validate that file is on disk - if filename[0] != '/': - filename = '/' + filename - script = "M23 " + filename + "\nM24" + if filename[0] == '/': + filename = filename[1:] + script = "SDCARD_PRINT_FILE FILENAME=" + filename return await self._send_gcode(script) async def gcode_restart(self, path, method, args):