web server tweaks

This commit is contained in:
cottongin
2026-01-25 21:22:49 -05:00
parent af58eb1987
commit cda8a5ec6d
3 changed files with 268 additions and 1 deletions

View File

@@ -77,7 +77,7 @@ void CrossPointWebServerActivity::onEnter() {
updateRequired = true;
xTaskCreate(&CrossPointWebServerActivity::taskTrampoline, "WebServerActivityTask",
2048, // Stack size
6144, // Stack size (increased: QR code + string ops need ~4KB)
this, // Parameters
1, // Priority
&displayTaskHandle // Task handle

View File

@@ -1143,6 +1143,11 @@ void CrossPointWebServer::handleRename() const {
esp_task_wdt_reset();
if (SdMan.rename(itemPath.c_str(), newPath.c_str())) {
Serial.printf("[%lu] [WEB] Rename successful\n", millis());
// Clear epub cache for both old and new paths to prevent stale metadata
clearEpubCacheIfNeeded(itemPath); // Old path cache is now invalid
clearEpubCacheIfNeeded(newPath); // Ensure clean cache for new path
server->send(200, "text/plain", "Renamed successfully");
} else {
Serial.printf("[%lu] [WEB] Rename failed\n", millis());