Refactored ScanLibrary to produce page numbers on the Manga File, Format and to update existing series/volumes rather than always create new entries.

This commit is contained in:
Joseph Milazzo 2021-01-09 15:27:04 -06:00
parent 6b4617bab3
commit 59a4921ba9
12 changed files with 709 additions and 38 deletions

View file

@ -151,7 +151,14 @@ namespace API.Controllers
[HttpDelete("delete")]
public async Task<ActionResult<bool>> DeleteLibrary(int libraryId)
{
return Ok(await _libraryRepository.DeleteLibrary(libraryId));
var result = await _libraryRepository.DeleteLibrary(libraryId);
if (result)
{
// TODO: This should clear out any cache items associated with library
}
return Ok(result);
}
[Authorize(Policy = "RequireAdminRole")]

View file

@ -1,7 +1,4 @@
using System;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Linq;
using System.Threading.Tasks;
using API.DTOs;
using API.Entities;
@ -55,8 +52,6 @@ namespace API.Controllers
file.Page = page;
return Ok(file);
//return File(await _directoryService.ReadImageAsync(path), "image/jpg", filename);
}
}
}