📄 src/Cli/Program.cs
using System.Threading;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Slopper.Domain;
using Slopper.Infrastructure.Ai;
using Slopper.Infrastructure.Database;
using Slopper.Infrastructure.Ffmpeg;

var builder = Host.CreateApplicationBuilder();

builder.Services.AddClipSelector().AddClipGenerator();

builder.Services.AddJellyfinDatabase().AddSlopperDatabase().AddFfmpegServices().AddAi();

using var app = builder.Build();

await app.StartAsync(CancellationToken.None);

using var scope = app.Services.CreateScope();
var clipGenerator = scope.ServiceProvider.GetRequiredService<ClipGenerator>();
await clipGenerator.Generate(CancellationToken.None);

await app.StopAsync(CancellationToken.None);