Refactored GetCoverImage to create a thumbnail (optional) instead of raw image (raw images are large and bloat API, using thumbnail is indistiguishable); b) Ability to force updating cover images in DB even if they are already set.

This commit is contained in:
Joseph Milazzo 2021-01-07 10:30:54 -06:00
parent 7f5a1d0518
commit 0b35ec70fd
12 changed files with 95 additions and 68 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();
}
@ -131,7 +131,7 @@ namespace API.Controllers
[HttpPost("scan")]
public ActionResult ScanLibrary(int libraryId)
{
BackgroundJob.Enqueue(() => _directoryService.ScanLibrary(libraryId));
BackgroundJob.Enqueue(() => _directoryService.ScanLibrary(libraryId, true));
return Ok();
}