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.
26 lines
748 B
26 lines
748 B
using Recyclarr.TrashLib.Config.Services;
|
|
using Recyclarr.TrashLib.ExceptionTypes;
|
|
|
|
namespace Recyclarr.TrashLib.Compatibility.Radarr;
|
|
|
|
public class RadarrCapabilityEnforcer
|
|
{
|
|
private readonly IRadarrCapabilityFetcher _capabilityFetcher;
|
|
|
|
public RadarrCapabilityEnforcer(IRadarrCapabilityFetcher capabilityFetcher)
|
|
{
|
|
_capabilityFetcher = capabilityFetcher;
|
|
}
|
|
|
|
public async Task Check(RadarrConfiguration config)
|
|
{
|
|
var capabilities = await _capabilityFetcher.GetCapabilities(config);
|
|
if (capabilities is null)
|
|
{
|
|
throw new ServiceIncompatibilityException("Capabilities could not be obtained");
|
|
}
|
|
|
|
// For the future: Add more capability checks here as needed
|
|
}
|
|
}
|