diff --git a/src/Recyclarr.Cli/Pipelines/CustomFormat/CustomFormatAutofacModule.cs b/src/Recyclarr.Cli/Pipelines/CustomFormat/CustomFormatAutofacModule.cs index 04f93f63..6e7a0319 100644 --- a/src/Recyclarr.Cli/Pipelines/CustomFormat/CustomFormatAutofacModule.cs +++ b/src/Recyclarr.Cli/Pipelines/CustomFormat/CustomFormatAutofacModule.cs @@ -17,6 +17,7 @@ public class CustomFormatAutofacModule : Module builder.RegisterType(); builder.RegisterType().As>(); + builder.RegisterType(); builder.RegisterTypes( typeof(CustomFormatConfigPhase), diff --git a/src/Recyclarr.Cli/Pipelines/CustomFormat/CustomFormatPipelineExtensions.cs b/src/Recyclarr.Cli/Pipelines/CustomFormat/CustomFormatTransactionLogger.cs similarity index 94% rename from src/Recyclarr.Cli/Pipelines/CustomFormat/CustomFormatPipelineExtensions.cs rename to src/Recyclarr.Cli/Pipelines/CustomFormat/CustomFormatTransactionLogger.cs index 5110cfd3..013e6d3b 100644 --- a/src/Recyclarr.Cli/Pipelines/CustomFormat/CustomFormatPipelineExtensions.cs +++ b/src/Recyclarr.Cli/Pipelines/CustomFormat/CustomFormatTransactionLogger.cs @@ -1,8 +1,8 @@ namespace Recyclarr.Cli.Pipelines.CustomFormat; -internal static class CustomFormatPipelineExtensions +internal class CustomFormatTransactionLogger(ILogger log) { - public static void LogTransactions(this CustomFormatPipelineContext context, ILogger log) + public void LogTransactions(CustomFormatPipelineContext context) { var transactions = context.TransactionOutput; diff --git a/src/Recyclarr.Cli/Pipelines/CustomFormat/PipelinePhases/CustomFormatLogPhase.cs b/src/Recyclarr.Cli/Pipelines/CustomFormat/PipelinePhases/CustomFormatLogPhase.cs index cf92bc74..b1c94a72 100644 --- a/src/Recyclarr.Cli/Pipelines/CustomFormat/PipelinePhases/CustomFormatLogPhase.cs +++ b/src/Recyclarr.Cli/Pipelines/CustomFormat/PipelinePhases/CustomFormatLogPhase.cs @@ -2,7 +2,8 @@ using Recyclarr.Cli.Pipelines.Generic; namespace Recyclarr.Cli.Pipelines.CustomFormat.PipelinePhases; -public class CustomFormatLogPhase(ILogger log) : ILogPipelinePhase +internal class CustomFormatLogPhase(CustomFormatTransactionLogger cfLogger, ILogger log) + : ILogPipelinePhase { // Returning 'true' means to exit. 'false' means to proceed. public bool LogConfigPhaseAndExitIfNeeded(CustomFormatPipelineContext context) @@ -23,6 +24,6 @@ public class CustomFormatLogPhase(ILogger log) : ILogPipelinePhase +internal class CustomFormatPreviewPhase(CustomFormatTransactionLogger logger) + : IPreviewPipelinePhase { public void Execute(CustomFormatPipelineContext context) { - context.LogTransactions(log); + logger.LogTransactions(context); } }