Merge pull request #20 from Kareadita/feature/cover-images

Implements ability to set cover images from archive files and to force updating DB entries. Cover images will be compressed and a thumbnail will be saved rather than raw image due to size of raw files (1MB vs 60 KB)
This commit is contained in:
Joseph Milazzo 2021-01-08 10:10:02 -06:00 committed by GitHub
commit cf953c1e06
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 1292 additions and 82 deletions

View file

@ -72,7 +72,7 @@ namespace API.Controllers
if (await _userRepository.SaveAllAsync())
{
var createdLibrary = await _libraryRepository.GetLibraryForNameAsync(library.Name);
BackgroundJob.Enqueue(() => _directoryService.ScanLibrary(createdLibrary.Id));
BackgroundJob.Enqueue(() => _directoryService.ScanLibrary(createdLibrary.Id, false));
return Ok();
}
@ -129,9 +129,9 @@ namespace API.Controllers
[Authorize(Policy = "RequireAdminRole")]
[HttpPost("scan")]
public ActionResult ScanLibrary(int libraryId)
public ActionResult Scan(int libraryId)
{
BackgroundJob.Enqueue(() => _directoryService.ScanLibrary(libraryId));
BackgroundJob.Enqueue(() => _directoryService.ScanLibrary(libraryId, true));
return Ok();
}