kolyvan / kybook

modern ebook reader for iOS
83 stars 10 forks source link

KyBook 3 won't download from a Jellyfin OPDS feed #438

Open mcoms opened 2 years ago

mcoms commented 2 years ago

KyBook 3 refuses to download books from Jellyfin's OPDS plugin, but will download fine from Calibre's OPDS content server.

iOS returns a MIME type error: IMG_61357689D673-1

curl reports both servers sending the correct MIME type, however Calibre sends the file as an "attachment" (with a Content-Disposition header), whereas Jellyfin streams it inline. As fas as I could see the OPDS spec doesn't have an opinion, but accepting files inline, in addition to attachments, may prove compatible with more servers.

# Jellyfin OPDS plugin
< HTTP/1.1 200 OK
< Date: Sat, 12 Mar 2022 20:52:28 GMT
< Content-Type: application/epub+zip
< Server: Kestrel
< Content-Length: 1035996
< Last-Modified: Sat, 12 Mar 2022 17:34:06 GMT
< X-Response-Time-ms: 396
# Calibre Content Server
< HTTP/1.1 200 OK
< Accept-Ranges: bytes
< Content-Disposition: attachment; filename="test book.epub"; filename*=utf-8''test%20book.epub
< Content-Length: 1036177
< Content-Type: application/epub+zip
< Date: Sat, 12 Mar 2022 20:53:25 GMT
< ETag: "1978996d9342fb71526ca69f51f818a6ee5a4de7"
< Keep-Alive: timeout=120
< Server: calibre 5.38.0

I have raised an issue on the server side: https://github.com/jellyfin/jellyfin-plugin-opds/issues/23