ScanLibrary now respects the library a series belongs to, doesn't reset series every run but updates/removes/inserts as needed.
This commit is contained in:
parent
44ebca36ec
commit
e180032a8e
5 changed files with 54 additions and 29 deletions
|
@ -170,7 +170,7 @@ namespace API.Controllers
|
|||
{
|
||||
var username = User.GetUsername();
|
||||
_logger.LogInformation($"Library {libraryId} is being deleted by {username}.");
|
||||
var series = await _unitOfWork.SeriesRepository.GetSeriesDtoForLibraryIdAsync(libraryId);
|
||||
var series = await _unitOfWork.SeriesRepository.GetSeriesForLibraryIdAsync(libraryId);
|
||||
var volumes = (await _unitOfWork.SeriesRepository.GetVolumesForSeriesAsync(series.Select(x => x.Id).ToArray()))
|
||||
.Select(x => x.Id).ToArray();
|
||||
var result = await _unitOfWork.LibraryRepository.DeleteLibrary(libraryId);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue