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
+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: