Skip to content

Commit 76f706d

Browse files
committed
0.1.8rc9
* 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
1 parent 5c8a978 commit 76f706d

File tree

5 files changed

+13
-3
lines changed

5 files changed

+13
-3
lines changed

octoprint_bambu_printer/printer/file_system/cached_file_view.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ def get_file_by_name(self, file_name: str):
8686
file_name = f"{file_name}.3mf"
8787
elif f"{file_name}.gcode.3mf" in file_list:
8888
file_name = f"{file_name}.gcode.3mf"
89+
elif f"cache/{file_name}.3mf" in file_list:
90+
file_name = f"cache/{file_name}.3mf"
91+
elif f"cache/{file_name}.gcode.3mf" in file_list:
92+
file_name = f"cache/{file_name}.gcode.3mf"
8993

9094
file_data = self.get_file_data_cached(file_name)
9195
if file_data is None:

octoprint_bambu_printer/printer/states/printing_state.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ def update_print_job_info(self):
8181
return
8282

8383
progress = print_job_info.print_percentage
84+
if print_job_info.gcode_state == "PREPARE" and progress == 100:
85+
progress = 0
8486
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)
8587
self._printer.select_project_file(project_file_info.path.as_posix())
8688

octoprint_bambu_printer/static/js/bambu_printer.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ $(function () {
2222

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

25+
self.show_password = ko.pureComputed(function(){
26+
return self.settingsViewModel.settings.plugins.bambu_printer.auth_token() === '';
27+
});
28+
2529
self.show_verification = ko.pureComputed(function(){
2630
return self.auth_type() !== '';
2731
});

octoprint_bambu_printer/templates/bambu_printer_settings.jinja2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@
4343
<input type="text" class="input-block-level" data-bind="value: settingsViewModel.settings.plugins.bambu_printer.email" title="{{ _('Registered email address') }}" autocomplete="off"></input>
4444
</div>
4545
</div>
46-
<div class="control-group" data-bind="visible: !settingsViewModel.settings.plugins.bambu_printer.local_mqtt()">
46+
<div class="control-group" data-bind="visible: !settingsViewModel.settings.plugins.bambu_printer.local_mqtt() && show_password()">
4747
<label class="control-label">{{ _('Password') }}</label>
4848
<div class="controls">
49-
<div class="input-block-level input-append">
49+
<div class="input-block-level input-append" data-bind="css: {'input-append': !show_verification()}">
5050
<input id="bambu_cloud_password" type="password" class="input-text input-block-level" title="{{ _('Password to generate verification code') }}" autocomplete="new-password"></input>
5151
<span class="btn btn-primary add-on" data-bind="visible: !show_verification(), click: getAuthToken">{{ _('Login') }}</span>
5252
</div>

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
plugin_name = "OctoPrint-BambuPrinter"
1515

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

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

0 commit comments

Comments
 (0)