feat(opds): Allow selecting the download format

When downloading a book via OPDS, the last acquisition link is chosen when there are multiple. This allows choosing which format to download when there are many. Having only one format will automatically download that.
This commit is contained in:
Joel Goguen
2026-04-19 23:15:54 -04:00
parent c38013aac3
commit 1986092522
12 changed files with 941 additions and 14 deletions
+8
View File
@@ -13,6 +13,13 @@ enum class OpdsEntryType {
BOOK // Downloadable book
};
struct OpdsAcquisitionLink {
std::string href;
std::string mimeType;
std::string formatKey;
std::string fileExtension;
};
/**
* Represents an entry from an OPDS feed (either a navigation link or a book).
*/
@@ -22,6 +29,7 @@ struct OpdsEntry {
std::string author; // Only for books
std::string href; // Navigation URL or epub download URL
std::string id;
std::vector<OpdsAcquisitionLink> acquisitionLinks;
};
// Legacy alias for backward compatibility