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
5.65k stars 284 forks source link

Series detection faulty for large epub series #1749

Closed Remnence closed 1 year ago

Remnence commented 1 year ago

Version: 6.1 Environment: k8s pod on NAS.

I have a book series that has 134 books in it, but Kavita seems to only detect 30ish of them. All other series detection seems to be working right.

Logs: [Kavita] [2023-01-16 15:45:42.713 -06:00 44] [Information] API.Services.Tasks.Scanner.ProcessSeries [ScannerService] Beginning series update on In Enemy Hands [Kavita] [2023-01-16 15:45:42.719 -06:00 44] [Information] API.Services.Tasks.Scanner.ProcessSeries [ScannerService] Processing series In Enemy Hands [Kavita] [2023-01-16 15:45:42.719 -06:00 44] [Debug] API.Services.Tasks.Scanner.ProcessSeries [ScannerService] Updating 1 volumes on In Enemy Hands [Kavita] [2023-01-16 15:45:42.719 -06:00 44] [Debug] API.Services.Tasks.Scanner.ProcessSeries [ScannerService] Looking up volume for 26.0 [Kavita] [2023-01-16 15:45:42.719 -06:00 44] [Debug] API.Services.Tasks.Scanner.ProcessSeries [ScannerService] Parsing In Enemy Hands - Volume 26.0 [Kavita] [2023-01-16 15:45:42.720 -06:00 44] [Debug] API.Services.Tasks.Scanner.ProcessSeries [ScannerService] Read ComicInfo for /manga/Library/Fiction/OPDS/In Enemy Hands - Warren Murphy & Richard Sapir.epub [Kavita] [2023-01-16 15:45:42.720 -06:00 44] [Debug] API.Services.Tasks.Scanner.ProcessSeries [ScannerService] Updated In Enemy Hands volumes from count of 1 to 1 [Kavita] [2023-01-16 15:45:42.720 -06:00 44] [Debug] API.Services.Tasks.Scanner.ProcessSeries Updating In Enemy Hands FolderPath to /manga/Library/Fiction/OPDS [Kavita] [2023-01-16 15:45:42.892 -06:00 83] [Information] API.Services.Tasks.Metadata.WordCountAnalyzerService [WordCountAnalyzerService] Updated metadata for Lullaby in 178 milliseconds [Kavita] [2023-01-16 15:45:42.956 -06:00 85] [Information] Serilog.AspNetCore.RequestLoggingMiddleware HTTP GET /api/image/series-cover responded 200 in 1.2816 ms [Kavita] [2023-01-16 15:45:42.960 -06:00 88] [Information] Serilog.AspNetCore.RequestLoggingMiddleware HTTP GET /api/image/series-cover responded 200 in 0.8490 ms [Kavita] [2023-01-16 15:45:42.960 -06:00 88] [Information] Serilog.AspNetCore.RequestLoggingMiddleware HTTP GET /api/image/series-cover responded 200 in 1.8005 ms [Kavita] [2023-01-16 15:45:42.960 -06:00 83] [Information] Serilog.AspNetCore.RequestLoggingMiddleware HTTP GET /api/image/series-cover responded 200 in 0.6309 ms [Kavita] [2023-01-16 15:45:42.963 -06:00 42] [Information] Serilog.AspNetCore.RequestLoggingMiddleware HTTP GET /api/image/series-cover responded 200 in 7.8800 ms [Kavita] [2023-01-16 15:45:42.964 -06:00 88] [Information] Serilog.AspNetCore.RequestLoggingMiddleware HTTP GET /api/image/series-cover responded 200 in 4.7463 ms [Kavita] [2023-01-16 15:45:44.258 -06:00 44] [Information] API.Services.Tasks.Scanner.ProcessSeries [ScannerService] Finished series update on In Enemy Hands in 1545 ms

This book should have detected as Volume 26 in series The Destroyer but it was detected as its own title.

majora2007 commented 1 year ago

What you are describing is a metadata issue, rather than a bug. Check against the opf inside each epub and against the wiki to make sure the appropriate tags are set.

You can do scan series from UI to pick up on changes if not using folder watching.

wpisarski commented 1 year ago

I have a seemingly related problem. I have a large Calibre database scanned in Kavita. There is one large series with many volumes by different authors. Series is tagged inside EPUBs (not the separate .opf that Calibre keeps along with EPUB) with <meta name="calibre:series" content="Name_of_the_series"/> and numbered. Folder watching is enabled, but files were tagged before adding the library to Kavita.

Whenever I trigger a scan then Kavita randomly picks only EPUBs from a single author, the rest is not displayed anywhere and is not available in search results. Every time rescan is triggered it produces books from different author, I guess whatever was scanned last.

majora2007 commented 1 year ago

@wpisarski your situation is indicative of your folder structure not matching what Kavita expects. There are examples and rules on the wiki that should fix your issue.

wpisarski commented 1 year ago

Shouldn't tags take precedence? I've seen the guide, but even the guide suggests using Calibre for managing metadata. At the very least I would expect duplicated series per author folder, now it just quietly ignores existence of other files.

Remnence commented 1 year ago

I've tried in both a flat folder structure and one separated by Series. Both resulted in the same outcome. This structure is also built on the the epubs I have meticulously sorted and tagged via Calibre. Every other series in my 1000+ books detects correctly.

Further to this only book 45 and then 81-134 of this series detect correctly and the rest all come out as their own series.

Remnence commented 1 year ago

OPF data from the book mentioned in the logs: `

    <meta name="calibre:series_index" content="26"/>
    <meta name="calibre:timestamp" content="2017-10-22T22:06:14+00:00"/>
    <meta name="calibre:title_sort" content="In Enemy Hands"/>`
Remnence commented 1 year ago

In my experience so far with Light Novels, if the filename and the series name conflict you end up with broken Series as well.

Remnence commented 1 year ago

@wpisarski I did have a series with many authors that putting them all in a correct folder structure(Series/Author/Books) did fix the detection. That doesn't seem to be the case for this series though. They are all by the same author as well. I do agree that making the metadata tags overwrite/take control should resolve all these issues.