mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-07-09 03:04:20 -04:00
Pointing out the bug with the scan task
This commit is contained in:
parent
82add5cd50
commit
5eed35d4ac
@ -10,6 +10,8 @@ namespace Kyoo.Controllers
|
||||
[HttpGet("scan")]
|
||||
public IActionResult ScanLibrary([FromServices] ICrawler crawler)
|
||||
{
|
||||
// The crawler is destroyed before the completion of this task.
|
||||
// TODO implement an hosted service that can queue tasks from the controller.
|
||||
crawler.StartAsync(new CancellationToken());
|
||||
return Ok("Scanning");
|
||||
}
|
||||
|
@ -41,10 +41,10 @@ namespace Kyoo
|
||||
// services.AddIdentityServer();
|
||||
|
||||
services.AddScoped<ILibraryManager, LibraryManager>();
|
||||
services.AddScoped<ICrawler, Crawler>();
|
||||
services.AddSingleton<ITranscoder, Transcoder>();
|
||||
services.AddSingleton<IThumbnailsManager, ThumbnailsManager>();
|
||||
services.AddSingleton<IProviderManager, ProviderManager>();
|
||||
services.AddScoped<ICrawler, Crawler>();
|
||||
services.AddSingleton<IPluginManager, PluginManager>();
|
||||
|
||||
services.AddHostedService<StartupCode>();
|
||||
|
Loading…
x
Reference in New Issue
Block a user