Metadata Bugfixes (#1511)
* Fix XML deserialization of empty elements to integers * Fix assumption that environment uses US time format * Use series name as SeriesSort in epub * Address some PR comments * Add partial Equals(0 implementation to ComicInfo * Update ComicInfo unittest. Revert previous version
This commit is contained in:
parent
0a6e64d767
commit
a1c3f43656
5 changed files with 42 additions and 22 deletions
|
@ -447,6 +447,10 @@ public class BookService : IBookService
|
|||
case "calibre:title_sort":
|
||||
info.TitleSort = metadataItem.Content;
|
||||
break;
|
||||
case "calibre:series":
|
||||
info.Series = metadataItem.Content;
|
||||
info.SeriesSort = metadataItem.Content;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -609,15 +613,10 @@ public class BookService : IBookService
|
|||
FullFilePath = filePath,
|
||||
IsSpecial = false,
|
||||
Series = series.Trim(),
|
||||
SeriesSort = series.Trim(),
|
||||
Volumes = seriesIndex
|
||||
};
|
||||
|
||||
// Don't set titleSort if the book belongs to a group
|
||||
if (!string.IsNullOrEmpty(titleSort) && string.IsNullOrEmpty(seriesIndex) && (groupPosition.Equals("series") || groupPosition.Equals("set")))
|
||||
{
|
||||
info.SeriesSort = titleSort;
|
||||
}
|
||||
|
||||
return info;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -647,7 +647,7 @@ public class ProcessSeries : IProcessSeries
|
|||
{
|
||||
var day = Math.Max(comicInfo.Day, 1);
|
||||
var month = Math.Max(comicInfo.Month, 1);
|
||||
chapter.ReleaseDate = DateTime.Parse($"{month}/{day}/{comicInfo.Year}");
|
||||
chapter.ReleaseDate = new DateTime(comicInfo.Year, month, day);
|
||||
}
|
||||
|
||||
var people = GetTagValues(comicInfo.Colorist);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue