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

22 lines
567 B

using Recyclarr.Config.Models;
using Recyclarr.ServarrApi.Services;
using Recyclarr.TrashGuide.CustomFormat;
namespace Recyclarr.Cli.Pipelines.CustomFormat.PipelinePhases;
public class CustomFormatApiFetchPhase
{
private readonly ICustomFormatService _api;
public CustomFormatApiFetchPhase(ICustomFormatService api)
{
_api = api;
}
public async Task<IReadOnlyCollection<CustomFormatData>> Execute(IServiceConfiguration config)
{
var result = await _api.GetCustomFormats(config);
return result.AsReadOnly();
}
}