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:
Joe Milazzo 2023-04-24 18:51:15 -05:00 committed by GitHub
parent 868d20a18e
commit 19198beadf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 5 deletions

View File

@ -70,7 +70,8 @@ public static class ApplicationServiceExtensions
{
options.UseSqlite("Data source=config/kavita.db");
options.EnableDetailedErrors();
options.EnableSensitiveDataLogging(env.IsDevelopment());
options.EnableSensitiveDataLogging();
});
}
}

View File

@ -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();
}
}
}

View File

@ -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
{

View File

@ -304,8 +304,11 @@ public static class Configuration
private sealed class AppSettings
{
public string TokenKey { get; set; }
// ReSharper disable once MemberHidesStaticFromOuterClass
public int Port { get; set; }
// ReSharper disable once MemberHidesStaticFromOuterClass
public string IpAddresses { get; set; }
// ReSharper disable once MemberHidesStaticFromOuterClass
public string BaseUrl { get; set; }
}
}

View File

@ -7,7 +7,7 @@
"name": "GPL-3.0",
"url": "https://github.com/Kareadita/Kavita/blob/develop/LICENSE"
},
"version": "0.7.1.38"
"version": "0.7.1.41"
},
"servers": [
{