Skip to content

Commit

Permalink
0.1.8rc9
Browse files Browse the repository at this point in the history
* check for filename in cache subfolder for files started through cloud connected printers
* send 0% progress when in prepare state and progress is 100
* minor UI tweaks
  • Loading branch information
jneilliii committed Nov 10, 2024
1 parent 5c8a978 commit 76f706d
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ def get_file_by_name(self, file_name: str):
file_name = f"{file_name}.3mf"
elif f"{file_name}.gcode.3mf" in file_list:
file_name = f"{file_name}.gcode.3mf"
elif f"cache/{file_name}.3mf" in file_list:
file_name = f"cache/{file_name}.3mf"
elif f"cache/{file_name}.gcode.3mf" in file_list:
file_name = f"cache/{file_name}.gcode.3mf"

file_data = self.get_file_data_cached(file_name)
if file_data is None:
Expand Down
2 changes: 2 additions & 0 deletions octoprint_bambu_printer/printer/states/printing_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ def update_print_job_info(self):
return

progress = print_job_info.print_percentage
if print_job_info.gcode_state == "PREPARE" and progress == 100:
progress = 0
self._printer.current_print_job = PrintJob(project_file_info, progress, print_job_info.remaining_time, print_job_info.current_layer, print_job_info.total_layers)
self._printer.select_project_file(project_file_info.path.as_posix())

Expand Down
4 changes: 4 additions & 0 deletions octoprint_bambu_printer/static/js/bambu_printer.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ $(function () {

self.auth_type = ko.observable("");

self.show_password = ko.pureComputed(function(){
return self.settingsViewModel.settings.plugins.bambu_printer.auth_token() === '';
});

self.show_verification = ko.pureComputed(function(){
return self.auth_type() !== '';
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@
<input type="text" class="input-block-level" data-bind="value: settingsViewModel.settings.plugins.bambu_printer.email" title="{{ _('Registered email address') }}" autocomplete="off"></input>
</div>
</div>
<div class="control-group" data-bind="visible: !settingsViewModel.settings.plugins.bambu_printer.local_mqtt()">
<div class="control-group" data-bind="visible: !settingsViewModel.settings.plugins.bambu_printer.local_mqtt() && show_password()">
<label class="control-label">{{ _('Password') }}</label>
<div class="controls">
<div class="input-block-level input-append">
<div class="input-block-level input-append" data-bind="css: {'input-append': !show_verification()}">
<input id="bambu_cloud_password" type="password" class="input-text input-block-level" title="{{ _('Password to generate verification code') }}" autocomplete="new-password"></input>
<span class="btn btn-primary add-on" data-bind="visible: !show_verification(), click: getAuthToken">{{ _('Login') }}</span>
</div>
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-BambuPrinter"

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

# 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 76f706d

Please sign in to comment.