diff --git a/octoprint_bambu_printer/printer/file_system/cached_file_view.py b/octoprint_bambu_printer/printer/file_system/cached_file_view.py index c1e1d0b..c48278f 100644 --- a/octoprint_bambu_printer/printer/file_system/cached_file_view.py +++ b/octoprint_bambu_printer/printer/file_system/cached_file_view.py @@ -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: diff --git a/octoprint_bambu_printer/printer/states/printing_state.py b/octoprint_bambu_printer/printer/states/printing_state.py index d78c9f1..2784b24 100644 --- a/octoprint_bambu_printer/printer/states/printing_state.py +++ b/octoprint_bambu_printer/printer/states/printing_state.py @@ -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()) diff --git a/octoprint_bambu_printer/static/js/bambu_printer.js b/octoprint_bambu_printer/static/js/bambu_printer.js index 5bce2f4..de259a5 100644 --- a/octoprint_bambu_printer/static/js/bambu_printer.js +++ b/octoprint_bambu_printer/static/js/bambu_printer.js @@ -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() !== ''; }); diff --git a/octoprint_bambu_printer/templates/bambu_printer_settings.jinja2 b/octoprint_bambu_printer/templates/bambu_printer_settings.jinja2 index ac4421d..be3bfcf 100644 --- a/octoprint_bambu_printer/templates/bambu_printer_settings.jinja2 +++ b/octoprint_bambu_printer/templates/bambu_printer_settings.jinja2 @@ -43,10 +43,10 @@ -
+
-
+
{{ _('Login') }}
diff --git a/setup.py b/setup.py index d6311c4..3ee85ed 100644 --- a/setup.py +++ b/setup.py @@ -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