kolyvan / kybook

modern ebook reader for iOS
84 stars 10 forks source link

BUG: Incorrect metadata when downloading from OPDS Catalog #136

Open karlic opened 5 years ago

karlic commented 5 years ago

iOS 12.1.4 KyBook 3 v0.7.7 | #162

  1. I have two PDFs in Calibre: PDF1 had no cover page, title, author, or subject when it was added to Calibre PDF2 had no cover page, author, or subject and a nonsense title when it was added to Calibre I used Calibre to download the correct metadata (cover, title, author, and subject) for both PDFs Both PDFs display the corrected cover, title, author, and subject in Calibre, as expected
  2. Connect to Calibre Content Server from KyBook 3 Both PDFs display the corrected cover, title, author, and subject, as expected
  3. Download PDF1 to KyBook 3. The Book has the corrected title, author, and subject, but does NOT display the correct cover
  4. Download PDF2 to KyBook 3 The Book has the corrected author and subject, but does NOT display the correct cover AND has the nonsense title

So: A) it seems that if a PDF has no title, author, or subject, they are taken from Calibre's data, but if they ARE present in the PDF that value is used. This is the wrong way round, as Calibre's data are always the correct version. B) KyBook 3 is not picking up the cover from Calibre. (I have checked in the metadata table in KyBook 3's database and the field coverurl DOES have the correct value http://Home.local:8080/get/cover/704/Calibre_Library and if I visit that URL in a browser the correct cover is displayed. However, I can't get the hash (md5, sha1, or sha256) of the downloaded JPEG (either whole or without metadata) to match the field coverhash in the table metadata.

karlic commented 5 years ago

Having another look at this, I see that viewing the field thumbnail shows the book's first page, NOT the cover at http://Home.local:8080/get/cover/704/Calibre_Library

karlic commented 5 years ago

For anyone interested, I've sorted this out by writing a Python script that takes metadata directly from Calibre and syncs it to KyBook 3. If there's any interest, I'll make it available.

BTW, turns out coverhash and thumbnail were red herrings.