Add opds image download

This commit is contained in:
jpirnay
2026-05-10 20:47:35 +02:00
parent c4b94737fd
commit 80eb889256
8 changed files with 100 additions and 28 deletions
+4
View File
@@ -197,6 +197,10 @@ void XMLCALL OpdsParser::startElement(void* userData, const XML_Char* name, cons
}
self->currentEntry.acquisitionLinks.push_back(acquisition);
}
} else if (rel && type && strstr(rel, "opds-spec.org/image") != nullptr &&
strstr(rel, "thumbnail") == nullptr && strstr(type, "image/jpeg") != nullptr &&
self->currentEntry.imageHref.empty()) {
self->currentEntry.imageHref = href;
} else if (type && strstr(type, "application/atom+xml") != nullptr) {
if (self->currentEntry.type != OpdsEntryType::BOOK) {
self->currentEntry.type = OpdsEntryType::NAVIGATION;
+1
View File
@@ -31,6 +31,7 @@ struct OpdsEntry {
std::string href; // Navigation URL or epub download URL
std::string id;
std::vector<OpdsAcquisitionLink> acquisitionLinks;
std::string imageHref; // Cover image URL (rel="http://opds-spec.org/image"), books only
};
// Legacy alias for backward compatibility