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:
commit
cf953c1e06
30 changed files with 1292 additions and 82 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();
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue