- Introduced `IAiExtractionService` and its implementation `AiExtractionService` for processing images and extracting text. - Created `AiResultItem` model to hold results from AI extraction. - Added `ImageProcessingCoordinator` to manage image processing tasks and provide progress updates. - Implemented view models for AI settings, path settings, processing state, race upload settings, and visual settings to support UI binding. - Updated `Program.cs` to register new services and dependencies. - Modified project file to skip MinVer execution during local builds.
28 lines
786 B
C#
28 lines
786 B
C#
using System;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
using MaddoShared;
|
|
|
|
namespace ImageCatalog_2.Services
|
|
{
|
|
public readonly record struct ImageProcessedUpdate(string Status, int Total, int Processed);
|
|
|
|
public sealed class ImageProcessingRunRequest
|
|
{
|
|
public required ImageCreationService.Options Options { get; init; }
|
|
}
|
|
|
|
public sealed class ImageProcessingRunResult
|
|
{
|
|
public required string FinalSpeedCounter { get; init; }
|
|
}
|
|
|
|
public interface IImageProcessingCoordinator
|
|
{
|
|
Task<ImageProcessingRunResult> RunAsync(
|
|
ImageProcessingRunRequest request,
|
|
CancellationToken token,
|
|
Action<ImageProcessedUpdate> onImageProcessed,
|
|
Action<string> onSpeedUpdated);
|
|
}
|
|
}
|