Compare commits

..

No commits in common. "8d791b6e0785c04a290aba2034671fe09d061cc8" and "b483b46b4060f9bd832cdec23cef6198a0cfcc7b" have entirely different histories.

6 changed files with 21 additions and 19 deletions

@ -1 +1 @@
Subproject commit c39f253a7dabbc193a8d7d310fb8777dca0ab8f1
Subproject commit bd4e6707503ab9c97d13ee0d8f8c69e9ff03cd12

View File

@ -1,6 +1,7 @@
#include "CrossPointWebServer.h"
#include <ArduinoJson.h>
#include "util/BookCacheManager.h"
#include <Epub.h>
#include <FsHelpers.h>
#include <SDCardManager.h>
@ -11,7 +12,6 @@
#include "html/FilesPageHtml.generated.h"
#include "html/HomePageHtml.generated.h"
#include "util/BookCacheManager.h"
#include "util/StringUtils.h"
namespace {
@ -875,6 +875,8 @@ void CrossPointWebServer::handleRename() const {
}
}
// WebSocket callback trampoline
void CrossPointWebServer::wsEventCallback(uint8_t num, WStype_t type, uint8_t* payload, size_t length) {
if (wsInstance) {

View File

@ -80,4 +80,5 @@ class CrossPointWebServer {
void handleDelete() const;
void handleMove() const;
void handleRename() const;
};

View File

@ -1,10 +1,8 @@
#include "BookCacheManager.h"
#include <HardwareSerial.h>
#include "../CrossPointState.h"
#include "../RecentBooksStore.h"
#include "StringUtils.h"
#include <HardwareSerial.h>
#include "../RecentBooksStore.h"
#include "../CrossPointState.h"
bool BookCacheManager::migrateCache(const String& oldPath, const String& newPath) {
if (oldPath == newPath) return true;
@ -91,8 +89,10 @@ String BookCacheManager::getCachePath(const String& path) {
}
bool BookCacheManager::isSupportedFile(const String& path) {
return StringUtils::checkFileExtension(path, ".epub") || StringUtils::checkFileExtension(path, ".txt") ||
StringUtils::checkFileExtension(path, ".xtc") || StringUtils::checkFileExtension(path, ".xtg") ||
return StringUtils::checkFileExtension(path, ".epub") ||
StringUtils::checkFileExtension(path, ".txt") ||
StringUtils::checkFileExtension(path, ".xtc") ||
StringUtils::checkFileExtension(path, ".xtg") ||
StringUtils::checkFileExtension(path, ".xth");
}

View File

@ -2,7 +2,6 @@
#include <SDCardManager.h>
#include <WString.h>
#include <string>
class BookCacheManager {