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