Random Book Fixes (#2434)
This commit is contained in:
parent
1cc5484655
commit
17d6cd7843
9 changed files with 284 additions and 44 deletions
|
@ -555,7 +555,7 @@ public class BookService : IBookService
|
|||
// If this is a single book and not a collection, set publication status to Completed
|
||||
if (string.IsNullOrEmpty(info.Volume) && Parser.ParseVolume(filePath).Equals(Parser.DefaultVolume))
|
||||
{
|
||||
info.Number = "1";
|
||||
//info.Number = "1";
|
||||
info.Count = 1;
|
||||
}
|
||||
|
||||
|
@ -635,6 +635,8 @@ public class BookService : IBookService
|
|||
return;
|
||||
case "aut":
|
||||
case "author":
|
||||
case "creator":
|
||||
case "cre":
|
||||
info.Writer += AppendAuthor(person);
|
||||
return;
|
||||
case "pbl":
|
||||
|
|
|
@ -291,8 +291,11 @@ public class ProcessSeries : IProcessSeries
|
|||
var maxVolume = series.Volumes.Max(v => (int) Parser.Parser.MaxNumberFromRange(v.Name));
|
||||
var maxChapter = chapters.Max(c => (int) Parser.Parser.MaxNumberFromRange(c.Range));
|
||||
|
||||
|
||||
if ((maxChapter == 0 || maxChapter > series.Metadata.TotalCount) && maxVolume <= series.Metadata.TotalCount)
|
||||
// Single books usually don't have a number in their Range (filename)
|
||||
if (series.Format == MangaFormat.Epub || series.Format == MangaFormat.Pdf && chapters.Count == 1)
|
||||
{
|
||||
series.Metadata.MaxCount = 1;
|
||||
} else if ((maxChapter == 0 || maxChapter > series.Metadata.TotalCount) && maxVolume <= series.Metadata.TotalCount)
|
||||
{
|
||||
series.Metadata.MaxCount = maxVolume;
|
||||
} else if (maxVolume == series.Metadata.TotalCount)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue