feat: implement background ebook indexing with progress tracking and real-time UI updates

This commit is contained in:
2026-05-25 08:51:21 +02:00
parent 39717725ec
commit 1c6ee82d01
20 changed files with 718 additions and 57 deletions
@@ -16,6 +16,7 @@ public class SyncService : ISyncService, IAsyncDisposable
private CancellationTokenSource? _debounceCts;
public event Func<string, DateTime, Task>? OnProgressReceived;
public event Func<string, double, Task>? OnIngestionProgressReceived;
public SyncService(
HttpClient httpClient,
@@ -53,6 +54,11 @@ public class SyncService : ISyncService, IAsyncDisposable
if (OnProgressReceived != null) await OnProgressReceived(pageId, timestamp);
});
_hubConnection.On<string, double>("IngestionProgress", async (message, progress) =>
{
if (OnIngestionProgressReceived != null) await OnIngestionProgressReceived(message, progress);
});
try
{
await _hubConnection.StartAsync();