You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
recyclarr/src/Recyclarr.Cli/Pipelines/CustomFormat/PipelinePhases/CustomFormatApiFetchPhase.cs

18 lines
599 B

using Recyclarr.Cli.Pipelines.Generic;
using Recyclarr.Common.Extensions;
using Recyclarr.Config.Models;
using Recyclarr.ServarrApi.CustomFormat;
namespace Recyclarr.Cli.Pipelines.CustomFormat.PipelinePhases;
public class CustomFormatApiFetchPhase(ICustomFormatApiService api)
: IApiFetchPipelinePhase<CustomFormatPipelineContext>
{
public async Task Execute(CustomFormatPipelineContext context, IServiceConfiguration config)
{
var result = await api.GetCustomFormats(config);
context.ApiFetchOutput.AddRange(result);
context.Cache.RemoveStale(result);
}
}