Skip to content

Commit

Permalink
Merge pull request #59 from NilsRo/Development
Browse files Browse the repository at this point in the history
Filament Changetime is not updated in GUI
  • Loading branch information
NilsRo authored Feb 17, 2023
2 parents e020ceb + 5d1509f commit 38c42f1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
15 changes: 11 additions & 4 deletions octoprint_SlicerEstimator/static/js/SlicerEstimator.js
Original file line number Diff line number Diff line change
Expand Up @@ -304,11 +304,18 @@ $(function() {
}
});
};

//get list of enabled metadata and filament change if a file is selected
self.onEventFileSelected = function(payload) {
self.addMetadata(payload["origin"], payload["path"]);
}
self.addMetadataLocal = function(filepath)
{
if (self.printerStateViewModel.sd() == false && filepath !== null) {
self.addMetadata("local", filepath);
}
};
self.printerStateViewModel.filepath.subscribe(function(filepath) {self.addMetadataLocal(filepath)});
self.printerStateViewModel.printTimeLeft.subscribe(function() {self.addMetadataLocal(self.printerStateViewModel.filepath())});
self.printerStateViewModel.estimatedPrintTime.subscribe(function() {self.addMetadataLocal(self.printerStateViewModel.filepath())});
self.printerStateViewModel.filepos.subscribe(function() {self.addMetadataLocal(self.printerStateViewModel.filepath())});

//on reload if GUI refresh selected file
ko.when(function () {
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
plugin_name = "OctoPrint-SlicerEstimator"

# The plugin's version. Can be overwritten within OctoPrint's internal data via __plugin_version__ in the plugin module
plugin_version = "1.6.0"
plugin_version = "1.6.1"

# The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin
# module
Expand Down

0 comments on commit 38c42f1

Please sign in to comment.