Refactor: Replace CalibreWirelessActivity with CalibreConnectActivity (#404)
Cherry-picked from upstream PR #404 with conflict resolution: - Replaced flaky TCP-based Calibre wireless with WebSocket-based transfer - Added OPDS authentication support (username/password in settings) - Renamed "Calibre Library" to "OPDS Browser" in home menu - Added UDP discovery for Calibre plugin communication - Merged user's custom settings (customFontIndex, fallbackFontFamily, pinnedListName) - Applied vTaskDelay cleanup after task deletion - Kept existing "Calibre Settings" menu item (skipped KOReader Sync per preference) Fixes issue #334 (Calibre wireless transfer not working)
This commit is contained in:
@@ -18,7 +18,6 @@
|
||||
namespace {
|
||||
constexpr int PAGE_ITEMS = 23;
|
||||
constexpr int SKIP_PAGE_MS = 700;
|
||||
constexpr char OPDS_ROOT_PATH[] = "opds"; // No leading slash - relative to server URL
|
||||
} // namespace
|
||||
|
||||
void OpdsBookBrowserActivity::taskTrampoline(void* param) {
|
||||
@@ -33,7 +32,7 @@ void OpdsBookBrowserActivity::onEnter() {
|
||||
state = BrowserState::CHECK_WIFI;
|
||||
entries.clear();
|
||||
navigationHistory.clear();
|
||||
currentPath = OPDS_ROOT_PATH;
|
||||
currentPath = ""; // Root path - user provides full URL in settings
|
||||
selectorIndex = 0;
|
||||
errorMessage.clear();
|
||||
statusMessage = "Checking WiFi...";
|
||||
@@ -173,7 +172,7 @@ void OpdsBookBrowserActivity::render() const {
|
||||
const auto pageWidth = renderer.getScreenWidth();
|
||||
const auto pageHeight = renderer.getScreenHeight();
|
||||
|
||||
renderer.drawCenteredText(UI_12_FONT_ID, 15, "Calibre Library", true, EpdFontFamily::BOLD);
|
||||
renderer.drawCenteredText(UI_12_FONT_ID, 15, "OPDS Browser", true, EpdFontFamily::BOLD);
|
||||
|
||||
if (state == BrowserState::CHECK_WIFI) {
|
||||
renderer.drawCenteredText(UI_10_FONT_ID, pageHeight / 2, statusMessage.c_str());
|
||||
|
||||
Reference in New Issue
Block a user