j7126 / OctoPrint-Dashboard

A dashboard for Octoprint
GNU Affero General Public License v3.0
288 stars 39 forks source link

Fix saving metadata for files in subfolders #307

Closed EnAppelsin closed 3 years ago

EnAppelsin commented 3 years ago

I noticed Octoprint-Dashboard was causing very high CPU usage during prints, and it seemed to be looping preprocessing the gcode infinitely. Eventually found as my GCode was in a subfolder, it was not correctly saving the metadata and looping constantly reanalysing the gcode (even during print! causing stuttering)

This quick fix has solved the problem, the save_additional_metadata call now uses the path, as get_metadata does.