Scan Loop Fixes (#1572)
* Cleanup some messaging in the scan loop to be more context bearing * Added Response Caching to Series Detail for 1 min, due to the heavy nature of the call. * Refactored code to make it so that processing of series runs sync correctly. Added a log to inform the user of corrupted volume from buggy code in v0.5.6. * Moved folder watching out of experimental * Fixed an issue where empty folders could break the scan loop * Another fix for when dates aren't valid, the scanner wouldn't get the proper min and would throw an exception (develop) * Implemented the ability to edit release year from the UI for a series. * Added a unit test for some new logic * Code smells
This commit is contained in:
parent
78b043af74
commit
13226fecc1
16 changed files with 1867 additions and 77 deletions
|
@ -1001,6 +1001,41 @@ public class SeriesServiceTests
|
|||
Assert.True(series.Metadata.GenresLocked);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task UpdateSeriesMetadata_ShouldNotUpdateReleaseYear_IfLessThan1000()
|
||||
{
|
||||
await ResetDb();
|
||||
var s = new Series()
|
||||
{
|
||||
Name = "Test",
|
||||
Library = new Library()
|
||||
{
|
||||
Name = "Test LIb",
|
||||
Type = LibraryType.Book,
|
||||
},
|
||||
Metadata = DbFactory.SeriesMetadata(new List<CollectionTag>())
|
||||
};
|
||||
_context.Series.Add(s);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
var success = await _seriesService.UpdateSeriesMetadata(new UpdateSeriesMetadataDto()
|
||||
{
|
||||
SeriesMetadata = new SeriesMetadataDto()
|
||||
{
|
||||
SeriesId = 1,
|
||||
ReleaseYear = 100,
|
||||
},
|
||||
CollectionTags = new List<CollectionTagDto>()
|
||||
});
|
||||
|
||||
Assert.True(success);
|
||||
|
||||
var series = await _unitOfWork.SeriesRepository.GetSeriesByIdAsync(1);
|
||||
Assert.NotNull(series.Metadata);
|
||||
Assert.Equal(0, series.Metadata.ReleaseYear);
|
||||
Assert.False(series.Metadata.ReleaseYearLocked);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region GetFirstChapterForMetadata
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue