parent
3d403ef737
commit
c775bc3c4d
@ -1,6 +0,0 @@
|
||||
namespace Common;
|
||||
|
||||
public class AppContextProxy : IAppContext
|
||||
{
|
||||
public string BaseDirectory => AppContext.BaseDirectory;
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace Common.Extensions;
|
||||
|
||||
public static class RegexExtensions
|
||||
{
|
||||
[SuppressMessage("Design", "CA1021:Avoid out parameters",
|
||||
Justification =
|
||||
"The out param has a very specific design purpose. It's to allow regex match expressions " +
|
||||
"to be executed inside an if condition while also providing match output variable.")]
|
||||
public static bool Match(this Regex re, string strToCheck, out Match match)
|
||||
{
|
||||
match = re.Match(strToCheck);
|
||||
return match.Success;
|
||||
}
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
namespace Common;
|
||||
|
||||
public interface IAppContext
|
||||
{
|
||||
string BaseDirectory { get; }
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
namespace Recyclarr.Command.Helpers;
|
||||
|
||||
public enum ExitCode
|
||||
{
|
||||
Success = 0,
|
||||
Failure = 1
|
||||
}
|
@ -1,20 +1,22 @@
|
||||
using JetBrains.Annotations;
|
||||
|
||||
namespace TrashLib.Config.Settings;
|
||||
|
||||
public record TrashRepository
|
||||
{
|
||||
public string CloneUrl { get; init; } = "https://github.com/TRaSH-/Guides.git";
|
||||
public string Branch { get; init; } = "master";
|
||||
public string? Sha1 { get; init; }
|
||||
public string CloneUrl { get; [UsedImplicitly] init; } = "https://github.com/TRaSH-/Guides.git";
|
||||
public string Branch { get; [UsedImplicitly] init; } = "master";
|
||||
public string? Sha1 { get; [UsedImplicitly] init; }
|
||||
}
|
||||
|
||||
public record LogJanitorSettings
|
||||
{
|
||||
public int MaxFiles { get; init; } = 20;
|
||||
public int MaxFiles { get; [UsedImplicitly] init; } = 20;
|
||||
}
|
||||
|
||||
public record SettingsValues
|
||||
{
|
||||
public TrashRepository Repository { get; init; } = new();
|
||||
public bool EnableSslCertificateValidation { get; init; } = true;
|
||||
public LogJanitorSettings LogJanitor { get; init; } = new();
|
||||
public TrashRepository Repository { get; [UsedImplicitly] init; } = new();
|
||||
public bool EnableSslCertificateValidation { get; [UsedImplicitly] init; } = true;
|
||||
public LogJanitorSettings LogJanitor { get; [UsedImplicitly] init; } = new();
|
||||
}
|
||||
|
@ -1,7 +1,9 @@
|
||||
using JetBrains.Annotations;
|
||||
|
||||
namespace TrashLib.Services.Sonarr.Api.Objects;
|
||||
|
||||
public class SonarrTag
|
||||
{
|
||||
public string Label { get; set; } = "";
|
||||
public int Id { get; set; }
|
||||
public string Label { get; [UsedImplicitly] set; } = "";
|
||||
public int Id { get; [UsedImplicitly] set; }
|
||||
}
|
||||
|
@ -1,23 +1,26 @@
|
||||
using JetBrains.Annotations;
|
||||
using TrashLib.Config.Services;
|
||||
|
||||
namespace TrashLib.Services.Sonarr.Config;
|
||||
|
||||
public class SonarrConfiguration : ServiceConfiguration
|
||||
{
|
||||
public IList<ReleaseProfileConfig> ReleaseProfiles { get; init; } = Array.Empty<ReleaseProfileConfig>();
|
||||
public string QualityDefinition { get; init; } = "";
|
||||
public IList<ReleaseProfileConfig> ReleaseProfiles { get; [UsedImplicitly] init; } =
|
||||
Array.Empty<ReleaseProfileConfig>();
|
||||
|
||||
public string QualityDefinition { get; [UsedImplicitly] init; } = "";
|
||||
}
|
||||
|
||||
public class ReleaseProfileConfig
|
||||
{
|
||||
public IReadOnlyCollection<string> TrashIds { get; init; } = Array.Empty<string>();
|
||||
public bool StrictNegativeScores { get; init; }
|
||||
public IReadOnlyCollection<string> Tags { get; init; } = Array.Empty<string>();
|
||||
public SonarrProfileFilterConfig? Filter { get; init; }
|
||||
public IReadOnlyCollection<string> TrashIds { get; [UsedImplicitly] init; } = Array.Empty<string>();
|
||||
public bool StrictNegativeScores { get; [UsedImplicitly] init; }
|
||||
public IReadOnlyCollection<string> Tags { get; [UsedImplicitly] init; } = Array.Empty<string>();
|
||||
public SonarrProfileFilterConfig? Filter { get; [UsedImplicitly] init; }
|
||||
}
|
||||
|
||||
public class SonarrProfileFilterConfig
|
||||
{
|
||||
public IReadOnlyCollection<string> Include { get; init; } = Array.Empty<string>();
|
||||
public IReadOnlyCollection<string> Exclude { get; init; } = Array.Empty<string>();
|
||||
public IReadOnlyCollection<string> Include { get; [UsedImplicitly] init; } = Array.Empty<string>();
|
||||
public IReadOnlyCollection<string> Exclude { get; [UsedImplicitly] init; } = Array.Empty<string>();
|
||||
}
|
||||
|
Loading…
Reference in new issue