Feature/misc (#1234)

* Fixed a bug where publication status could show as filled in when total number is 0 but there is a max count.

Add ComicInfo support for LocalizedSeries which will populate a Series LocalizedName.

Fixed an issue in tag constraint issues.

* Hooked in LocalizedSeries tag into merge step in scanner.

* Hooked in LocalizedSeries from ComicInfo into Kavita and also use it to help during merge phase to avoid 2 different series, if one file is using the name of the localized series.

* Reduced some extra string creation and updated epub library to ignore bad ToCs.

* Bumped dependencies to latest. When an epub doesn't have a dc:date with publication event type, default back to just a normal dc:date tag.

* Fixed a bug where webtoon reader would error out on first load due to how we passed the function to the reader

* Reverted the centering code
This commit is contained in:
Joseph Milazzo 2022-04-28 16:50:31 -05:00 committed by GitHub
parent 0eb3d74ff9
commit 1e51e39f66
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 114 additions and 66 deletions

View file

@ -457,10 +457,14 @@ public class ScannerService : IScannerService
if (existingSeries != null) continue;
var s = DbFactory.Series(infos[0].Series);
if (!string.IsNullOrEmpty(infos[0].SeriesSort))
if (!s.SortNameLocked && !string.IsNullOrEmpty(infos[0].SeriesSort))
{
s.SortName = infos[0].SeriesSort;
}
if (!s.LocalizedNameLocked && !string.IsNullOrEmpty(infos[0].LocalizedSeries))
{
s.LocalizedName = infos[0].LocalizedSeries;
}
s.Format = key.Format;
s.LibraryId = library.Id; // We have to manually set this since we aren't adding the series to the Library's series.
newSeries.Add(s);
@ -529,6 +533,13 @@ public class ScannerService : IScannerService
}
}
// parsedInfos[0] is not the first volume or chapter. We need to find it
var localizedSeries = parsedInfos.Select(p => p.LocalizedSeries).FirstOrDefault(p => !string.IsNullOrEmpty(p));
if (!series.LocalizedNameLocked && !string.IsNullOrEmpty(localizedSeries))
{
series.LocalizedName = localizedSeries;
}
await _eventHub.SendMessageAsync(MessageFactory.NotificationProgress, MessageFactory.LibraryScanProgressEvent(library.Name, ProgressEventType.Ended, series.Name));
UpdateSeriesMetadata(series, allPeople, allGenres, allTags, library.Type);