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.29k stars 327 forks source link

No file is added to the library after updating to v0.7.1.4 #1864

Closed AshDevFr closed 1 year ago

AshDevFr commented 1 year ago

Describe the bug

I had an old (probably v0.5.x) version of Kavita running on a Ubutu VM. It was working nicely and I decided to update to v0.7.1.4 to get the latest features and bug fixes.

After restarting the server, my manga library was present but empty. I thought it just needed a re-scan so I scanned the library again but it did not find anything.

I tried to delete and recreate the library and it did not work.

I decided to reinstall the app and restart from scratch but it did not help, no matter what I do the page shows 0 Series.

The log shows a lot of file found but nothing appears in the library.

Some logs:

Mar 08 01:05:10 kavita Kavita[1182]: [Kavita] [2023-03-08 01:05:10.821 +00:00  44] [Debug] API.Services.DirectoryService [ScanFiles] called on /mnt/Mangas/King of Hell
Mar 08 01:05:10 kavita Kavita[1182]: [Kavita] [2023-03-08 01:05:10.823 +00:00  44] [Debug] API.Services.Tasks.ScannerService [ScannerService] Found 50 files for /mnt/Mangas/King of Hell

The King of Hell folder is organized like this

<library_root_directory>
|
--- King of Hell
     |
     --- King of Hell - v01.cbz
     --- King of Hell - v02.cbz
     --- King of Hell - v03.cbz
     --- ...

A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Create a Manga library with cbz files
  2. Scan
  3. 0 Series

Expected behavior It used to find all my mangas so I expect it to still find them

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

scare376 commented 1 year ago

https://wiki.kavitareader.com/en/guides/managing-your-files/scanner The scan loop was upgraded a while back. I would check that link and see if your library follows the new requirements. (Note library root means the folder you selected for the library on the libraries settings page in kavita)

AshDevFr commented 1 year ago

I did check this link earlier and the example I provided should match the one on the page but it still does not work.

therobbiedavis commented 1 year ago

@AshDevFr This is a known issue with stable 0.7.1.x and has already been fixed in the nightly releases AFAIK. I would recommend using v0.6.1 until the next stable release.

majora2007 commented 1 year ago

I don't think this is a known issue. If the log is saying it found the series, then it should get put into Kavita. Can you search in the web ui for the filename and see if it shows up?

My thinking is your files have embedded metadata that has a different series.

therobbiedavis commented 1 year ago

I apologize, I got it mixed up with another known issue. For this we need more information. Can you provide a couple things while on v0.7.1.4:

AshDevFr commented 1 year ago

I moved a subset of files in a different directory to test so the logs would be smaller.

I also removed the ComicInfo.xml file from the volume 1 and re-scanned.

Now it picks up volume 1 and 2, not 3 and 4. I have not changed the volume 2 so it's weird that it's picking it up this time

Logs ``` Mar 08 16:06:02 kavita Kavita[1182]: [Kavita] [2023-03-08 16:06:02.986 +00:00 25] [Information] Serilog.AspNetCore.RequestLoggingMiddleware HTTP GET /api/settings/library-types responded 200 in 2.3493 ms Mar 08 16:06:03 kavita Kavita[1182]: [Kavita] [2023-03-08 16:06:03.091 +00:00 25] [Information] Serilog.AspNetCore.RequestLoggingMiddleware HTTP GET /api/library/name-exists responded 200 in 3.8612 ms Mar 08 16:06:04 kavita Kavita[1182]: [Kavita] [2023-03-08 16:06:04.558 +00:00 51] [Information] API.Services.TaskScheduler Enqueuing library scan for: 1 Mar 08 16:06:04 kavita Kavita[1182]: [Kavita] [2023-03-08 16:06:04.564 +00:00 18] [Information] API.Services.Tasks.CleanupService Performing cleanup of Cache & Temp directories Mar 08 16:06:04 kavita Kavita[1182]: [Kavita] [2023-03-08 16:06:04.564 +00:00 18] [Information] API.Services.Tasks.CleanupService Cache and temp directory purged Mar 08 16:06:04 kavita Kavita[1182]: [Kavita] [2023-03-08 16:06:04.565 +00:00 51] [Information] Serilog.AspNetCore.RequestLoggingMiddleware HTTP POST /api/library/scan responded 200 in 8.8608 ms Mar 08 16:06:04 kavita Kavita[1182]: [Kavita] [2023-03-08 16:06:04.567 +00:00 25] [Information] API.Services.Tasks.ScannerService [ScannerService] Beginning file scan on Mangas Mar 08 16:06:04 kavita Kavita[1182]: [Kavita] [2023-03-08 16:06:04.570 +00:00 25] [Debug] API.Services.DirectoryService [ScanFiles] called on /mnt/Mangas/_tests/King of Hell Mar 08 16:06:04 kavita Kavita[1182]: [Kavita] [2023-03-08 16:06:04.573 +00:00 25] [Debug] API.Services.Tasks.ScannerService [ScannerService] Found 4 files for /mnt/Mangas/_tests/King of Hell Mar 08 16:06:04 kavita Kavita[1182]: [Kavita] [2023-03-08 16:06:04.601 +00:00 25] [Information] API.Services.Tasks.Scanner.ProcessSeries [ScannerService] Beginning series update on King of Hell Mar 08 16:06:04 kavita Kavita[1182]: [Kavita] [2023-03-08 16:06:04.606 +00:00 25] [Information] API.Services.Tasks.Scanner.ProcessSeries [ScannerService] Processing series King of Hell Mar 08 16:06:04 kavita Kavita[1182]: [Kavita] [2023-03-08 16:06:04.607 +00:00 25] [Debug] API.Services.Tasks.Scanner.ProcessSeries [ScannerService] Updating 2 volumes on King of Hell Mar 08 16:06:04 kavita Kavita[1182]: [Kavita] [2023-03-08 16:06:04.607 +00:00 25] [Debug] API.Services.Tasks.Scanner.ProcessSeries [ScannerService] Looking up volume for 2003 Mar 08 16:06:04 kavita Kavita[1182]: [Kavita] [2023-03-08 16:06:04.608 +00:00 25] [Debug] API.Services.Tasks.Scanner.ProcessSeries [ScannerService] Parsing King of Hell - Volume 2003 Mar 08 16:06:04 kavita Kavita[1182]: [Kavita] [2023-03-08 16:06:04.608 +00:00 25] [Debug] API.Services.Tasks.Scanner.ProcessSeries [ScannerService] Adding new chapter, King of Hell - Vol 2003 Ch 2 Mar 08 16:06:04 kavita Kavita[1182]: [Kavita] [2023-03-08 16:06:04.614 +00:00 25] [Debug] API.Services.Tasks.Scanner.ProcessSeries [ScannerService] Adding new chapter, King of Hell - Vol 2003 Ch 3 Mar 08 16:06:04 kavita Kavita[1182]: [Kavita] [2023-03-08 16:06:04.620 +00:00 25] [Debug] API.Services.Tasks.Scanner.ProcessSeries [ScannerService] Adding new chapter, King of Hell - Vol 2003 Ch 4 Mar 08 16:06:04 kavita Kavita[1182]: [Kavita] [2023-03-08 16:06:04.625 +00:00 25] [Debug] API.Services.Tasks.Scanner.ProcessSeries [ScannerService] Read ComicInfo for /mnt/Mangas/_tests/King of Hell/King of Hell - v02.cbz Mar 08 16:06:04 kavita Kavita[1182]: [Kavita] [2023-03-08 16:06:04.626 +00:00 25] [Debug] API.Services.Tasks.Scanner.ProcessSeries [ScannerService] Read ComicInfo for /mnt/Mangas/_tests/King of Hell/King of Hell - v03.cbz Mar 08 16:06:04 kavita Kavita[1182]: [Kavita] [2023-03-08 16:06:04.627 +00:00 25] [Debug] API.Services.Tasks.Scanner.ProcessSeries [ScannerService] Read ComicInfo for /mnt/Mangas/_tests/King of Hell/King of Hell - v04.cbz Mar 08 16:06:04 kavita Kavita[1182]: [Kavita] [2023-03-08 16:06:04.627 +00:00 25] [Debug] API.Services.Tasks.Scanner.ProcessSeries [ScannerService] Looking up volume for 1 Mar 08 16:06:04 kavita Kavita[1182]: [Kavita] [2023-03-08 16:06:04.628 +00:00 25] [Debug] API.Services.Tasks.Scanner.ProcessSeries [ScannerService] Parsing King of Hell - Volume 1 Mar 08 16:06:04 kavita Kavita[1182]: [Kavita] [2023-03-08 16:06:04.628 +00:00 25] [Debug] API.Services.Tasks.Scanner.ProcessSeries [ScannerService] Adding new chapter, King of Hell - Vol 1 Ch 0 Mar 08 16:06:04 kavita Kavita[1182]: [Kavita] [2023-03-08 16:06:04.647 +00:00 25] [Debug] API.Services.Tasks.Scanner.ProcessSeries [ScannerService] Updated King of Hell volumes from count of 0 to 2 Mar 08 16:06:04 kavita Kavita[1182]: [Kavita] [2023-03-08 16:06:04.648 +00:00 25] [Debug] API.Services.Tasks.Scanner.ProcessSeries Updating King of Hell FolderPath to /mnt/Mangas/_tests/King of Hell Mar 08 16:06:04 kavita Kavita[1182]: [Kavita] [2023-03-08 16:06:04.669 +00:00 25] [Information] API.Services.Tasks.Scanner.ProcessSeries [ScannerService] Finished series update on King of Hell in 69 ms Mar 08 16:06:04 kavita Kavita[1182]: [Kavita] [2023-03-08 16:06:04.670 +00:00 25] [Debug] API.Services.MetadataService [MetadataService] Processing cover image generation for series: King of Hell Mar 08 16:06:04 kavita Kavita[1182]: [Kavita] [2023-03-08 16:06:04.671 +00:00 25] [Debug] API.Services.MetadataService [MetadataService] Generating cover image for /mnt/Mangas/_tests/King of Hell/King of Hell - v02.cbz Mar 08 16:06:04 kavita Kavita[1182]: [Kavita] [2023-03-08 16:06:04.687 +00:00 51] [Information] Serilog.AspNetCore.RequestLoggingMiddleware HTTP GET /api/series/2 responded 200 in 11.0820 ms Mar 08 16:06:04 kavita Kavita[1182]: [Kavita] [2023-03-08 16:06:04.752 +00:00 25] [Debug] API.Services.MetadataService [MetadataService] Generating cover image for /mnt/Mangas/_tests/King of Hell/King of Hell - v03.cbz Mar 08 16:06:04 kavita Kavita[1182]: [Kavita] [2023-03-08 16:06:04.896 +00:00 25] [Debug] API.Services.MetadataService [MetadataService] Generating cover image for /mnt/Mangas/_tests/King of Hell/King of Hell - v04.cbz Mar 08 16:06:04 kavita Kavita[1182]: [Kavita] [2023-03-08 16:06:04.921 +00:00 25] [Debug] API.Services.MetadataService [MetadataService] Generating cover image for /mnt/Mangas/_tests/King of Hell/King of Hell - v01.cbz Mar 08 16:06:04 kavita Kavita[1182]: [Kavita] [2023-03-08 16:06:04.973 +00:00 25] [Information] API.Services.MetadataService [MetadataService] Updated covers for King of Hell in 303 milliseconds Mar 08 16:06:04 kavita Kavita[1182]: [Kavita] [2023-03-08 16:06:04.974 +00:00 25] [Debug] API.Services.MetadataService Dispatching 7 update events Mar 08 16:06:04 kavita Kavita[1182]: [Kavita] [2023-03-08 16:06:04.976 +00:00 25] [Information] API.Services.Tasks.ScannerService [ScannerService] Finished file scan in 31 milliseconds. Updating database Mar 08 16:06:04 kavita Kavita[1182]: [Kavita] [2023-03-08 16:06:04.980 +00:00 25] [Information] API.Services.Tasks.ScannerService [ScannerService] Finished library scan of 4 files and 1 series in 418 milliseconds for Mangas Mar 08 16:06:04 kavita Kavita[1182]: [Kavita] [2023-03-08 16:06:04.980 +00:00 25] [Debug] API.Services.Tasks.ScannerService [ScannerService] Removing Series that were not found during the scan Mar 08 16:06:04 kavita Kavita[1182]: [Kavita] [2023-03-08 16:06:04.981 +00:00 25] [Debug] API.Services.Tasks.ScannerService [ScannerService] Found 0 series that needs to be removed: [] Mar 08 16:06:04 kavita Kavita[1182]: [Kavita] [2023-03-08 16:06:04.981 +00:00 25] [Debug] API.Services.Tasks.ScannerService [ScannerService] Removing Series that were not found during the scan - complete Mar 08 16:06:05 kavita Kavita[1182]: [Kavita] [2023-03-08 16:06:05.010 +00:00 25] [Information] API.Services.Tasks.Metadata.WordCountAnalyzerService [WordCountAnalyzerService] Updated metadata for King of Hell in 13 milliseconds Mar 08 16:06:05 kavita Kavita[1182]: [Kavita] [2023-03-08 16:06:05.011 +00:00 25] [Information] Serilog.AspNetCore.RequestLoggingMiddleware HTTP GET /api/image/series-cover responded 200 in 16.8917 ms Mar 08 16:06:05 kavita Kavita[1182]: [Kavita] [2023-03-08 16:06:05.148 +00:00 25] [Information] Serilog.AspNetCore.RequestLoggingMiddleware HTTP GET /api/image/series-cover responded 200 in 1.9703 ms Mar 08 16:06:05 kavita Kavita[1182]: [Kavita] [2023-03-08 16:06:05.835 +00:00 25] [Information] Serilog.AspNetCore.RequestLoggingMiddleware HTTP POST /api/library/update responded 200 in 9.4935 ms Mar 08 16:06:05 kavita Kavita[1182]: [Kavita] [2023-03-08 16:06:05.841 +00:00 25] [Information] Serilog.AspNetCore.RequestLoggingMiddleware HTTP GET /api/library responded 200 in 1.2921 ms ```
ComicInfo.xml ```xml Vol. 1 King of Hell 1 2003 In life, Majeh was a gifted swordsman. In death he acts as a whimsical reaper for the King of Hell, collecting the souls of the dead to bring them to the netherworld. All this changes when a mysterious rift opens up between Hell and Earth and evil spirits begin escaping into the mortal realm. Now Majeh must hunt down and destroy these mischievous demons before the rift is permanently opened. Scraped metadata from ComicVine [CVDB247003]. 2003 6 Ra In-soo Kim Jae-Hwan Kim Jae-Hwan Kim Jae-Hwan Tokyopop https://comicvine.gamespot.com/king-of-hell-1-vol-1/4000-247003/ 190 Majeh ```
therobbiedavis commented 1 year ago

@AshDevFr So what the logs so is that It picked up Volume 1 and Volume 2003. From the comic info I can see the volume is called 2003, which I am assuming is the same for all 4 volumes.

We group chapters of the same volume. So I would imagine if you look at the volume details for 2003 you will see the others group inside like the following: image

AshDevFr commented 1 year ago

Just check and it's what is happening. Even if it's what's happening for my whole library, should I at least get 1 volume per Serie instead of nothing?

Right now it's working in a small folder with only one serie with only 4 volumes instead of 254 Series with thousands of volumes?

Also I tried searching but nothing was in the search.

image

therobbiedavis commented 1 year ago

Just check and it's what is happening. Even if it's what's happening for my whole library, should I at least get 1 volume per Serie instead of nothing?

Yes, that should be the case.

If you set the library root for this in Kavita to be /mnt/Mangas then it should be working as such (unless you have the same series in multiple locations off the root). If it is still not working as such then I would recommend the Force Scan I mentioned earlier. The force scan bypasses our optimizations to speed up scan times and instead scan everything for that library regardless.

AshDevFr commented 1 year ago

I tried the force scan a couple of time and nothing appears. In the logs I was able to see this but I don't know if it's what is failing the whole scan:

Mar 08 18:44:13 kavita Kavita[1182]: System.Xml.XmlException: Data at the root level is invalid. Line 1, position 1.                                                                                                                                                                                                        [94/18261]
Mar 08 18:44:13 kavita Kavita[1182]:    at VersOne.Epub.Utils.TaskExtensionMethods.ExecuteAndUnwrapAggregateException[T](Task`1 task)
Mar 08 18:44:13 kavita Kavita[1182]:    at API.Services.BookService.ParseInfo(String filePath) in C:\Users\josep\Documents\Projects\KavitaOrg\Kavita\API\Services\BookService.cs:line 581
Mar 08 18:44:13 kavita Kavita[1182]: [Kavita] [2023-03-08 18:44:13.298 +00:00  53] [Warning] API.Services.BookService [BookService] There was an exception when opening epub book: /mnt/Mangas/Fate Stay Night FR/Fate stay Night - Volume 9.epub
AshDevFr commented 1 year ago

I created a .kavitaignore with all the directories and I'm going to test to add the series one by one. I'll update the post when I find the culprit

AshDevFr commented 1 year ago

Ok I was able to import everything after removing a directory.

I had a messed up directory that had a weird name because of an old ssh mistake.

The folder name was 'Kekkaishi\ \(Digital\)' so Kekkaishi\\\ \\\(Digital\\\) without the quotes. It's the only thing I found.

I hope it's helpful.

Since I can now see the series I'll close the issue.

Thanks for the help