foosel/OctoPrint — pull request #191 by CapnBry (2013-07-14 15:40:23+00:00)
Title: Automatically update job gcode metadata on analysis update

If the uploaded file is the currently selected job, this will automatically blank out the gcode metadata when the upload is complete, and then fill in the new data when the analysis is complete.

Only the first two changes to printer.py add the appropriate metadata update.

There was a bug in the gcodemanager that didn't delete the metadata if the file had spaces in it. It was comparing the un-santized filename with the sanitized version in the metadata list. See the first commit for more information.

I also removed bits of redundant code where the _selectedFile was being modified twice on SD upload.