* start moving local scans to separate process * send progress updates to main process * move scanners and tests * simplify dependencies; sync search index * commit search index more often when scanning * support forced scan and cancellation * use scanner process for plex libraries * update changelog * update dockerfiles * fix search index for local folder scanning * rework plex scanners * rework scanner handlers * emby works again * sync jellyfin * cleanup * update build * update changelog * remove scanner dependency in pr and artifacts workflows * fix mac sed syntax * fix pr build
16 lines
505 B
C#
16 lines
505 B
C#
using ErsatzTV.Core.MediaSources;
|
|
using Newtonsoft.Json;
|
|
|
|
namespace ErsatzTV.Scanner.Application.MediaSources;
|
|
|
|
public class ScannerProgressUpdateHandler : INotificationHandler<ScannerProgressUpdate>
|
|
{
|
|
public Task Handle(ScannerProgressUpdate notification, CancellationToken cancellationToken)
|
|
{
|
|
// dump progress to stdout for main process to read
|
|
string json = JsonConvert.SerializeObject(notification);
|
|
Console.WriteLine(json);
|
|
return Task.CompletedTask;
|
|
}
|
|
}
|