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
+21
View File
@@ -0,0 +1,21 @@
#pragma once
#include <cstddef>
#include <cstdint>
class Print {
public:
virtual ~Print() = default;
virtual size_t write(uint8_t) = 0;
virtual size_t write(const uint8_t* buffer, size_t size) {
size_t written = 0;
for (size_t i = 0; i < size; i++) {
written += write(buffer[i]);
}
return written;
}
virtual void flush() {}
};