Fix P2S empty archive tiles - add root folder to FTP search paths (Issue #146)

Printers without an SD card store files in the root folder `/` instead of
`/cache`. Added root folder to search paths in both main.py and bambu_ftp.py
so 3MF files can be found regardless of storage configuration.

Closes #146
This commit is contained in:
maziggy
2026-01-25 13:33:51 +01:00
parent 30537cfa54
commit ec3c47f048
3 changed files with 5 additions and 2 deletions
+3
View File
@@ -34,6 +34,9 @@ All notable changes to Bambuddy will be documented in this file.
- Bulk delete for multiple files at once
### Fixes
- **P2S Empty Archive Tiles** - Fixed FTP file search for printers without SD card (Issue #146):
- Added root folder `/` to search paths when looking for 3MF files
- Printers without SD card store files in root instead of `/cache`
- **Empty AMS Slot Not Recognized** - Fixed bug where removed spools still appeared in Bambuddy (Issue #147):
- Old AMS: Now properly applies empty values from tray data updates
- New AMS (AMS 2 Pro): Now checks `tray_exist_bits` bitmask to detect and clear empty slots
+1 -1
View File
@@ -720,7 +720,7 @@ async def on_print_start(printer_id: int, data: dict):
if not downloaded_filename and (filename or subtask_name):
search_term = (subtask_name or filename).lower().replace(".gcode", "").replace(".3mf", "")
logger.info(f"Direct FTP download failed, searching directories for '{search_term}'")
search_dirs = ["/cache", "/model", "/data", "/data/Metadata"]
search_dirs = ["/cache", "/model", "/data", "/data/Metadata", "/"]
for search_dir in search_dirs:
if downloaded_filename:
break
+1 -1
View File
@@ -323,7 +323,7 @@ class BambuFTPClient:
# Calculate used space by listing root directories
try:
total_used = 0
dirs_to_scan = ["/cache", "/timelapse", "/model", "/data", "/data/Metadata"]
dirs_to_scan = ["/cache", "/timelapse", "/model", "/data", "/data/Metadata", "/"]
for dir_path in dirs_to_scan:
try: