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:
Executable
+43
@@ -0,0 +1,43 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
BUILD_DIR="$ROOT_DIR/build/opds_parser"
|
||||
BINARY="$BUILD_DIR/OpdsParserTest"
|
||||
PLATFORMIO_DIR="${PLATFORMIO_CORE_DIR:-$HOME/.platformio}"
|
||||
ARDUINO_FRAMEWORK_DIR="$PLATFORMIO_DIR/packages/framework-arduinoespressif32"
|
||||
|
||||
mkdir -p "$BUILD_DIR"
|
||||
|
||||
SOURCES=(
|
||||
"$ROOT_DIR/test/opds_parser/OpdsParserTest.cpp"
|
||||
"$ROOT_DIR/lib/FsHelpers/FsHelpers.cpp"
|
||||
"$ROOT_DIR/lib/OpdsParser/OpdsParser.cpp"
|
||||
)
|
||||
|
||||
CXXFLAGS=(
|
||||
-std=c++20
|
||||
-O2
|
||||
-Wall
|
||||
-Wextra
|
||||
-pedantic
|
||||
-fno-exceptions
|
||||
-DARDUINO_USB_MODE=1
|
||||
-DARDUINO_USB_CDC_ON_BOOT=1
|
||||
-DDESTRUCTOR_CLOSES_FILE=1
|
||||
-DXML_GE=0
|
||||
-DXML_CONTEXT_BYTES=1024
|
||||
-DUSE_UTF8_LONG_NAMES=1
|
||||
-I"$ROOT_DIR/test/shims"
|
||||
-I"$ROOT_DIR"
|
||||
-I"$ROOT_DIR/lib"
|
||||
-I"$ROOT_DIR/lib/FsHelpers"
|
||||
-I"$ROOT_DIR/lib/OpdsParser"
|
||||
-I"$ROOT_DIR/lib/Logging"
|
||||
-I"$ARDUINO_FRAMEWORK_DIR/cores/esp32"
|
||||
-I"$ARDUINO_FRAMEWORK_DIR/variants/esp32c3"
|
||||
)
|
||||
|
||||
c++ "${CXXFLAGS[@]}" "${SOURCES[@]}" -lexpat -o "$BINARY"
|
||||
|
||||
"$BINARY" "$@"
|
||||
Reference in New Issue
Block a user