Kareadita / Kavita

Kavita is a fast, feature rich, cross platform reading server. Built with the goal of being a full solution for all your reading needs. Setup your own server and share your reading collection with your friends and family.
http://www.kavitareader.com
GNU General Public License v3.0
6.3k stars 327 forks source link

Not finding all PDFs in a series of PDFs #1446

Closed zzyzx-dc closed 2 years ago

zzyzx-dc commented 2 years ago

Kavita 0.5.4.0 (Running in Docker on Ubuntu Server 20.02)

Describe the bug I have a series of magazine issues in PDF format. They are named in numerical order. Kavita finds only one PDF.

To Reproduce Steps to reproduce the behavior:

  1. Place PDFs in appropriate folder
  2. Verify PDFs are in folder: $ ls main/media/books/magazines/ The\ Lamp/'The Lamp Issue 01.pdf' 'The Lamp Issue 03.pdf' 'The Lamp Issue 05.pdf' 'The Lamp Issue 07.pdf' 'The Lamp Issue 09.pdf' 'The Lamp Issue 11.pdf' 'The Lamp Issue 02.pdf' 'The Lamp Issue 04.pdf' 'The Lamp Issue 06.pdf' 'The Lamp Issue 08.pdf' 'The Lamp Issue 10.pdf'
  3. Verify volume bind mount: `$ cat /main/docker/kavita/docker-compose.yml version: '3.9' services: kavita: image: kizaing/kavita:latest volumes:
    • /main/media/books:/books
    • ./data:/kavita/config ports:
    • "5000:5000" restart: unless-stopped`
  4. Create a 'Books' library in Kavita and point it to folder /books/magazines
  5. Run scan
  6. Alternatively, create a 'Manga' or 'Comics' library in Kavita and point it to the same.

Expected behavior All PDFs would be found and loaded into the library.

Actual behavior One PDF is found: Issue 11.

Further thoughts

  1. I'm not sure if the PDF naming convention above is the problem. Perhaps Kavita thinks they're a Series?
  2. My apologies if this turns out to be a simple user error. Thanks.
majora2007 commented 2 years ago

Based on your naming convention, either a Book library or Comic library would be ideal. I did a quick test in a Book library and the series parsed as "The Lamp Issue" and I got 2 chapters from it. I would likely suggest for PDF to change your naming convention to something like: "The Lamp - Issue #1". We have a load of naming conventions on our wiki: https://wiki.kavitareader.com/en/guides/managing-your-files

I would also suggest updating to v0.5.5. You are on a version with known security vulnerabilities with CVEs published.

zzyzx-dc commented 2 years ago

Thank you for the assistance! I upgraded, thanks.

Renaming my files that way, it still only presented one cover as a Books library. But I did notice this time that the "Print Length" was listed at 600+ pages, which seems to indicate it's collecting all 11 PDFs as one entry. Upon opening that entry, I received an Unexpected Server Response: PDF.js v2.14.304 (build: 4f9b25b55) Message: Unexpected server response (401) while retrieving PDF "http://cassowary:5000/api/reader/pdf?chapterId=1734".

I tried a different approach, placing each of the PDFs in their own folders. I am now presented with four entries, and the first entry ("The Lamp Issue") has 484 pages. The other three ("The Lamp Issue-07", "The Lamp Issue-11" etc) have appropriate pagecounts.

All my PDFs are giving the same unexpected server response though (epubs are working), so I think I have bigger problems now.

Sorry!

majora2007 commented 2 years ago

So here's what I would suggest, create a book library or a comic library and name your files: The Lamp #01.pdf, etc. That is the most supported for Comics. You're obviously having some sort of filename parsing issue here and the solution is to rename your pdfs (as pdfs have no metadata read) so Kavita can read them correctly.

Again, see https://wiki.kavitareader.com/en/guides/managing-your-files/comics for some naming convention patterns we support.

zzyzx-dc commented 2 years ago

Okay thanks. Can confirm that renaming the magazine PDFs along that structure (#1, etc) and creating a new Comics library lets Kavita display them all as a Series. (Having it as a Books library seems to lump them all together as one? unsure)

I had reviewed that naming convention page, but it seemed to recommend volume/vol/v to designate editions in a series. I guess I was confused by that.

Thanks!

majora2007 commented 2 years ago

Books uses the manga parsing, to support light novels else epubs have internal metadata, so that's why you had these issues. Glad you got it working for you.