Fixed a bug where files tagged as specials (ComicInfo) were not propagating the title field to the UI.

This commit is contained in:
Joseph Milazzo 2025-06-27 11:35:09 -05:00
parent 4d435865a8
commit 2c9ad049ad
6 changed files with 39 additions and 4 deletions

View file

@ -972,4 +972,35 @@ public class ScannerServiceTests : AbstractDbTest
Assert.Contains(postLib.Series, x => x.Name == "Immoral Guild");
Assert.Contains(postLib.Series, x => x.Name == "Futoku No Guild");
}
#region Just Parsing Tests
[Fact]
public async Task Special_WithTitle_HasTitleSet()
{
const string testcase = "Series with Just a Special - Manga.json";
// Get the first file and generate a ComicInfo
var infos = new Dictionary<string, ComicInfo>();
infos.Add("just a bunch of junk.cbz", new ComicInfo()
{
Series = "test",
Title = "Special Title",
Format = "Special"
});
var library = await _scannerHelper.GenerateScannerData(testcase, infos);
var scanner = _scannerHelper.CreateServices();
await scanner.ScanLibrary(library.Id);
var postLib = await UnitOfWork.LibraryRepository.GetLibraryForIdAsync(library.Id, LibraryIncludes.Series);
// Validate that there are 2 series
Assert.NotNull(postLib);
Assert.Equal("test", postLib.Series.First().Name);
Assert.Equal("Special Title", postLib.Series.First().Volumes[0].Chapters[0].Title);
}
#endregion
}

View file

@ -0,0 +1,3 @@
[
"test/just a bunch of junk.cbz"
]