This commit is contained in:
jpirnay
2026-05-10 21:06:55 +02:00
parent 80eb889256
commit 5304086bcd
5 changed files with 37 additions and 21 deletions
@@ -403,6 +403,8 @@ void OpdsBookBrowserActivity::fetchFeed(const std::string& path) {
return;
}
entryOffsets.clear();
std::string url = (path.find("http") == 0) ? path : UrlUtils::buildUrl(server.url, path);
LOG_DBG("OPDS", "Fetching: %s", url.c_str());
@@ -448,12 +450,14 @@ void OpdsBookBrowserActivity::fetchFeed(const std::string& path) {
const auto& prevUrl = parser.getPrevPageUrl();
if (!prevUrl.empty()) {
OpdsEntry prevEntry{OpdsEntryType::NAVIGATION, tr(STR_PREV_PAGE), "", prevUrl, ""};
std::string resolvedPrevUrl = UrlUtils::buildUrl(url, prevUrl);
OpdsEntry prevEntry{OpdsEntryType::NAVIGATION, tr(STR_PREV_PAGE), "", resolvedPrevUrl, ""};
entryOffsets.insert(entryOffsets.begin(), cacheFile.position());
writeEntryToCache(cacheFile, prevEntry);
}
if (!nextUrl.empty()) {
OpdsEntry nextEntry{OpdsEntryType::NAVIGATION, tr(STR_NEXT_PAGE), "", nextUrl, ""};
std::string resolvedNextUrl = UrlUtils::buildUrl(url, nextUrl);
OpdsEntry nextEntry{OpdsEntryType::NAVIGATION, tr(STR_NEXT_PAGE), "", resolvedNextUrl, ""};
entryOffsets.push_back(cacheFile.position());
writeEntryToCache(cacheFile, nextEntry);
}
-3
View File
@@ -509,9 +509,6 @@ void loop() {
while (buttonEventManager.consumeEvent(ev)) {
const uint8_t action = actionFor(ev);
if (action == BA::BTN_DEFAULT) {
if (ev.type == ButtonEventManager::PressType::Double) {
continue;
}
defaultEvents.push_back(ev);
continue;
}