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.
18 lines
656 B
18 lines
656 B
using Recyclarr.Cli.Pipelines.Generic;
|
|
using Recyclarr.Common.Extensions;
|
|
using Recyclarr.Config.Models;
|
|
|
|
namespace Recyclarr.Cli.Pipelines.Tags.PipelinePhases;
|
|
|
|
public class TagTransactionPhase : ITransactionPipelinePhase<TagPipelineContext>
|
|
{
|
|
public void Execute(TagPipelineContext context, IServiceConfiguration config)
|
|
{
|
|
// List of tags in config that do not already exist in the service. The goal is to figure out which tags need to
|
|
// be created.
|
|
context.TransactionOutput = context.ConfigOutput
|
|
.Where(ct => context.ApiFetchOutput.All(st => !st.Label.EqualsIgnoreCase(ct)))
|
|
.ToList();
|
|
}
|
|
}
|