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.14k stars 319 forks source link

The epub can't be recognized #1842

Closed bennyz327 closed 1 year ago

bennyz327 commented 1 year ago

OS:TrueNAS-SCALE-22.12.0 Version:TrueChart stable v0.7.1_4.0.10 Browser:Edge ver110.0.1587.56

Description: The manga in epub format does not appear after scanning.

To Reproduce:

  1. In the directory /libraryroot/性食鬼
  2. add the file /libraryroot/性食鬼/性食鬼 - vol1.epub
  3. create a library in kavita and select /libraryroot as the library path
  4. run scanning
  5. nothing happen

Expected behavior: Should be able to identify epub file.

By thw way If I convert to ZIP format and keep the file structure unchanged, kavita can create a series called "性食鬼" normally and manga in zip file can be read, but in epub can't. But I really want to save manga in epub format. I wonder if this is a language issue (opf contains Chinese)

Below is the opf of the file. Hope this can helps. vol.opf.txt

scare376 commented 1 year ago

Sounds like a malformed epub. I would set logging to debug, run the scan again, and check the logs.

majora2007 commented 1 year ago

It seems also from steps to reproduce that your file isn't nested in a folder from library root.

If the epub is malformed, fix it with sigil or calibre. If not in logs, then you're not meeting the scanner requirements. See our wiki for how to adhere.

bennyz327 commented 1 year ago

In debug mode, I have some try.

There are just two files in the file structure. /manga/性食鬼/性食鬼 - vol1.zip /manga/性食鬼test/性食鬼test - vol1.epub zip file just included manga image file. Library's name was "Test" Library's root path was /manga

here is the Log log.txt Can this result find any problem?

epub file was re-export from calibre and it can be read in calibre with metadata.

therobbiedavis commented 1 year ago

@bennyz327 What I can tell from the logs is that it does in fact see both files.

[Kavita] [2023-02-27 21:58:47.346 +08:00  151] [Debug] API.Services.DirectoryService [ScanFiles] called on /manga/性食鬼test
[Kavita] [2023-02-27 21:58:47.346 +08:00  151] [Debug] API.Services.Tasks.ScannerService [ScannerService] Found 1 files for /manga/性食鬼test
[Kavita] [2023-02-27 21:58:47.354 +08:00  151] [Debug] API.Services.DirectoryService [ScanFiles] called on /manga/性食鬼
[Kavita] [2023-02-27 21:58:47.354 +08:00  151] [Debug] API.Services.Tasks.ScannerService [ScannerService] Found 1 files for /manga/性食鬼

Did you also change the series name for the epub? Otherwise if the same series if found in two different locations off the root, it will only submit the last one it scans, in this case from the logs /manga/性食鬼/性食鬼 - vol1.zip

bennyz327 commented 1 year ago

@therobbiedavis The "series" of the epub file has been changed to "性食鬼test" So, it was expected to create a series called "性食鬼test", but there was nothing. I have given up trying at the moment, I decided to use zip format for manga, so I need to convert epub to pdf, then convert it to zip, and adding xml metadata manually. It will be a little complex, but I have no choice haha

majora2007 commented 1 year ago

Just to validate, would you mind showing the snippet of the opf inside the epub where you changed. I want to validate there is no bug occurring within Kavita, regardless if you're going another route with your files.