|
|
@ -17,13 +17,17 @@ internal class RadarrCommand : ServiceCommand
|
|
|
|
"List available custom formats from the guide in YAML format.")]
|
|
|
|
"List available custom formats from the guide in YAML format.")]
|
|
|
|
public bool ListCustomFormats { get; [UsedImplicitly] set; }
|
|
|
|
public bool ListCustomFormats { get; [UsedImplicitly] set; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[CommandOption("list-qualities", Description =
|
|
|
|
|
|
|
|
"List available quality definition types from the guide.")]
|
|
|
|
|
|
|
|
public bool ListQualities { get; [UsedImplicitly] set; }
|
|
|
|
|
|
|
|
|
|
|
|
public override string Name => "Radarr";
|
|
|
|
public override string Name => "Radarr";
|
|
|
|
|
|
|
|
|
|
|
|
public override async Task Process(IServiceLocatorProxy container)
|
|
|
|
public override async Task Process(IServiceLocatorProxy container)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
await base.Process(container);
|
|
|
|
await base.Process(container);
|
|
|
|
|
|
|
|
|
|
|
|
var lister = container.Resolve<ICustomFormatLister>();
|
|
|
|
var lister = container.Resolve<IRadarrGuideDataLister>();
|
|
|
|
var log = container.Resolve<ILogger>();
|
|
|
|
var log = container.Resolve<ILogger>();
|
|
|
|
var customFormatUpdaterFactory = container.Resolve<Func<ICustomFormatUpdater>>();
|
|
|
|
var customFormatUpdaterFactory = container.Resolve<Func<ICustomFormatUpdater>>();
|
|
|
|
var qualityUpdaterFactory = container.Resolve<Func<IRadarrQualityDefinitionUpdater>>();
|
|
|
|
var qualityUpdaterFactory = container.Resolve<Func<IRadarrQualityDefinitionUpdater>>();
|
|
|
@ -35,6 +39,12 @@ internal class RadarrCommand : ServiceCommand
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (ListQualities)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
lister.ListQualities();
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
foreach (var config in configLoader.LoadMany(Config, "radarr"))
|
|
|
|
foreach (var config in configLoader.LoadMany(Config, "radarr"))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
log.Information("Processing server {Url}", FlurlLogging.SanitizeUrl(config.BaseUrl));
|
|
|
|
log.Information("Processing server {Url}", FlurlLogging.SanitizeUrl(config.BaseUrl));
|
|
|
|