mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-10-22 03:49:18 +02:00
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:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user