2026-10-19 15:22:34 +01:00
|
|
|
using Yavsc.Services;
|
|
|
|
|
|
|
|
|
|
namespace Yavsc.Api.Services;
|
|
|
|
|
|
|
|
|
|
public static class PodcastServiceCollectionExtensions
|
|
|
|
|
{
|
|
|
|
|
public static IServiceCollection AddPodcasts(this IServiceCollection services, IConfiguration configuration)
|
|
|
|
|
{
|
|
|
|
|
services.Configure<PodcastOptions>(configuration.GetSection("Podcast"));
|
|
|
|
|
services.AddSingleton<ILiveProcessor, LiveProcessor>();
|
2026-10-25 00:48:53 +01:00
|
|
|
services.AddSingleton<IPodcastReplayRemuxer, FfmpegPodcastReplayRemuxer>();
|
|
|
|
|
services.AddHostedService<PodcastReplayWorker>();
|
2026-10-19 15:22:34 +01:00
|
|
|
services.AddOpenApi("podcasts", options => options.ShouldInclude = description => description.GroupName == "podcasts");
|
|
|
|
|
return services;
|
|
|
|
|
}
|
|
|
|
|
}
|