Don't log exceptions to Sentry when debugging locally. Fixed a constraint issue with collection tags that prevented deleting series. Ensure when we scan we add SeriesMetadata objects to existing series. (#265)
This commit is contained in:
parent
606e4c8b12
commit
aa7439178c
8 changed files with 55 additions and 51 deletions
|
|
@ -172,10 +172,11 @@ namespace API.Controllers
|
|||
var username = User.GetUsername();
|
||||
_logger.LogInformation("Library {LibraryId} is being deleted by {UserName}", libraryId, username);
|
||||
var series = await _unitOfWork.SeriesRepository.GetSeriesForLibraryIdAsync(libraryId);
|
||||
var seriesIds = series.Select(x => x.Id).ToArray();
|
||||
var chapterIds =
|
||||
await _unitOfWork.SeriesRepository.GetChapterIdsForSeriesAsync(series.Select(x => x.Id).ToArray());
|
||||
var result = await _unitOfWork.LibraryRepository.DeleteLibrary(libraryId);
|
||||
|
||||
await _unitOfWork.SeriesRepository.GetChapterIdsForSeriesAsync(seriesIds);
|
||||
|
||||
var result = await _unitOfWork.LibraryRepository.DeleteLibrary(libraryId);
|
||||
if (result && chapterIds.Any())
|
||||
{
|
||||
_taskScheduler.CleanupChapters(chapterIds);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue