mirror of
https://github.com/Kareadita/Kavita.git
synced 2026-05-21 15:16:33 -04:00
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:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user