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:
parent
7f5a1d0518
commit
0b35ec70fd
12 changed files with 95 additions and 68 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue