Reading List Bug (#1943)
* Refactored how we calculate start and end dates for a reading list generated from Scan. * Cleaned up the logging messages a bit * By default, allow DB statements to include params, since there's no PPI involved.
This commit is contained in:
parent
868d20a18e
commit
19198beadf
5 changed files with 9 additions and 5 deletions
|
@ -70,7 +70,8 @@ public static class ApplicationServiceExtensions
|
|||
{
|
||||
options.UseSqlite("Data source=config/kavita.db");
|
||||
options.EnableDetailedErrors();
|
||||
options.EnableSensitiveDataLogging(env.IsDevelopment());
|
||||
|
||||
options.EnableSensitiveDataLogging();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -297,7 +297,7 @@ public class ReadingListService : IReadingListService
|
|||
/// <summary>
|
||||
/// Calculates the Start month/year and Ending month/year
|
||||
/// </summary>
|
||||
/// <param name="readingListWithItems">Reading list should have all items</param>
|
||||
/// <param name="readingListWithItems">Reading list should have all items and Chapters</param>
|
||||
public async Task CalculateStartAndEndDates(ReadingList readingListWithItems)
|
||||
{
|
||||
var items = readingListWithItems.Items;
|
||||
|
@ -497,11 +497,12 @@ public class ReadingListService : IReadingListService
|
|||
|
||||
readingList.Items = items;
|
||||
await CalculateReadingListAgeRating(readingList);
|
||||
await CalculateStartAndEndDates(readingList);
|
||||
if (_unitOfWork.HasChanges())
|
||||
{
|
||||
await _unitOfWork.CommitAsync();
|
||||
}
|
||||
await CalculateStartAndEndDates(await _unitOfWork.ReadingListRepository.GetReadingListByTitleAsync(arcPair.Item1, user.Id, ReadingListIncludes.Items | ReadingListIncludes.ItemChapter));
|
||||
await _unitOfWork.CommitAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -500,7 +500,6 @@ public class ProcessSeries : IProcessSeries
|
|||
_logger.LogDebug("[ScannerService] Updating {DistinctVolumes} volumes on {SeriesName}", distinctVolumes.Count, series.Name);
|
||||
foreach (var volumeNumber in distinctVolumes)
|
||||
{
|
||||
_logger.LogTrace("[ScannerService] Looking up volume for {VolumeNumber}", volumeNumber);
|
||||
Volume? volume;
|
||||
try
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue