Misc Bugfixes (#1373)

* Fixed an issue where signalr cover update events would fire before the covers were updated in db and hence UI would show as if no cover for quite some time.

* Refactored MetadataService to GenerateCovers, as that is what this service does.

* Fixed a bug where list item for books that have 0.X series index wouldn't render on series detail. Added Name updates on volume on scan

* Removed some debug code
This commit is contained in:
Joseph Milazzo 2022-07-13 15:19:00 -04:00 committed by GitHub
parent ea845ca64d
commit 141d10e6da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 66 additions and 36 deletions

View file

@ -192,7 +192,7 @@ public class ScannerService : IScannerService
await CleanupDbEntities();
BackgroundJob.Enqueue(() => _cacheService.CleanupChapters(chapterIds));
BackgroundJob.Enqueue(() => _directoryService.ClearDirectory(_directoryService.TempDirectory));
BackgroundJob.Enqueue(() => _metadataService.RefreshMetadataForSeries(libraryId, series.Id, false));
BackgroundJob.Enqueue(() => _metadataService.GenerateCoversForSeries(libraryId, series.Id, false));
BackgroundJob.Enqueue(() => _wordCountAnalyzerService.ScanSeries(libraryId, series.Id, false));
}
@ -327,7 +327,7 @@ public class ScannerService : IScannerService
await CleanupDbEntities();
BackgroundJob.Enqueue(() => _metadataService.RefreshMetadata(libraryId, false));
BackgroundJob.Enqueue(() => _metadataService.GenerateCoversForLibrary(libraryId, false));
BackgroundJob.Enqueue(() => _wordCountAnalyzerService.ScanLibrary(libraryId, false));
BackgroundJob.Enqueue(() => _directoryService.ClearDirectory(_directoryService.TempDirectory));
}
@ -804,6 +804,8 @@ public class ScannerService : IScannerService
_unitOfWork.VolumeRepository.Add(volume);
}
volume.Name = volumeNumber;
_logger.LogDebug("[ScannerService] Parsing {SeriesName} - Volume {VolumeNumber}", series.Name, volume.Name);
var infos = parsedInfos.Where(p => p.Volumes == volumeNumber).ToArray();
UpdateChapters(series, volume, infos);