Fix archive card showing "Source" badge for sliced .3mf files

The isSlicedFile() check only matched .gcode or .gcode.3mf extensions,
  so archives from .3mf prints (the standard Bambu slicer output) showed
  a "SOURCE" badge instead of "GCODE". Since .3mf can be either sliced or
  a raw CAD export, now checks the archive's total_layers and
  print_time_seconds metadata to distinguish them. Also passes the
  original filename when creating archives from file manager prints.
This commit is contained in:
maziggy
2026-03-03 14:26:03 +01:00
parent 6b92a99dd8
commit 19a1a7584b
5 changed files with 26 additions and 18 deletions
@@ -715,6 +715,7 @@ class BackgroundDispatchService:
archive = await archive_service.archive_print(
printer_id=job.printer_id,
source_file=file_path,
original_filename=lib_file.filename,
)
if not archive:
raise RuntimeError("Failed to create archive")