diff --git a/CHANGELOG.md b/CHANGELOG.md index 719207f8..7dcd748b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -90,6 +90,7 @@ side effects * [#680](https://github.com/foosel/OctoPrint/issues/680) - Don't accidentally include a newline from the MIME headers in the parsed multipart data from file uploads +* [#709](https://github.com/foosel/OctoPrint/issues/709) - Properly initialize time estimation for SD card transfers too * Various fixes of bugs in newly introduced features and improvements: * [#625](https://github.com/foosel/OctoPrint/pull/625) - Newly added GCODE files were not being added to the analysis queue diff --git a/src/octoprint/printer/__init__.py b/src/octoprint/printer/__init__.py index 73839462..e537e279 100644 --- a/src/octoprint/printer/__init__.py +++ b/src/octoprint/printer/__init__.py @@ -383,7 +383,7 @@ class Printer(): self._stateMonitor.addMessage(message) def _estimateTotalPrintTime(self, progress, printTime): - if not progress or not printTime: + if not progress or not printTime or not self._timeEstimationData: #self._estimationLogger.info("{progress};{printTime};;;;".format(**locals())) return None @@ -679,6 +679,7 @@ class Printer(): existingSdFiles = map(lambda x: x[0], self._comm.getSdFiles()) remoteName = util.getDosFilename(filename, existingSdFiles) + self._timeEstimationData = TimeEstimationHelper() self._comm.startFileTransfer(absolutePath, filename, remoteName) return remoteName