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.
53 lines
2.1 KiB
53 lines
2.1 KiB
2 years ago
|
using JetBrains.Annotations;
|
||
4 years ago
|
using Newtonsoft.Json;
|
||
|
|
||
1 year ago
|
namespace Recyclarr.Cli.Pipelines.ReleaseProfile.Api.Objects;
|
||
3 years ago
|
|
||
|
[UsedImplicitly(ImplicitUseKindFlags.Assign, ImplicitUseTargetFlags.Members)]
|
||
|
public class SonarrPreferredTerm
|
||
4 years ago
|
{
|
||
3 years ago
|
public SonarrPreferredTerm(int score, string term)
|
||
4 years ago
|
{
|
||
3 years ago
|
Term = term;
|
||
|
Score = score;
|
||
|
}
|
||
4 years ago
|
|
||
3 years ago
|
[JsonProperty("key")]
|
||
|
public string Term { get; set; }
|
||
4 years ago
|
|
||
3 years ago
|
[JsonProperty("value")]
|
||
|
public int Score { get; set; }
|
||
|
}
|
||
4 years ago
|
|
||
3 years ago
|
// Retained for supporting versions of Sonarr prior to v3.0.6.1355
|
||
|
// Offending change is here:
|
||
|
// https://github.com/Sonarr/Sonarr/blob/deed85d2f9147e6180014507ef4f5af3695b0c61/src/NzbDrone.Core/Datastore/Migration/162_release_profile_to_array.cs
|
||
|
// The Ignored and Required JSON properties were converted from string -> array in a backward-breaking way.
|
||
|
[UsedImplicitly(ImplicitUseKindFlags.Assign, ImplicitUseTargetFlags.Members)]
|
||
|
public class SonarrReleaseProfileV1
|
||
|
{
|
||
|
public int Id { get; set; }
|
||
|
public bool Enabled { get; set; }
|
||
|
public string Name { get; set; } = "";
|
||
|
public string Required { get; set; } = "";
|
||
|
public string Ignored { get; set; } = "";
|
||
|
public IReadOnlyCollection<SonarrPreferredTerm> Preferred { get; set; } = new List<SonarrPreferredTerm>();
|
||
|
public bool IncludePreferredWhenRenaming { get; set; }
|
||
|
public int IndexerId { get; set; }
|
||
|
public IReadOnlyCollection<int> Tags { get; set; } = new List<int>();
|
||
|
}
|
||
3 years ago
|
|
||
3 years ago
|
[UsedImplicitly(ImplicitUseKindFlags.Assign, ImplicitUseTargetFlags.Members)]
|
||
|
public class SonarrReleaseProfile
|
||
|
{
|
||
|
public int Id { get; set; }
|
||
|
public bool Enabled { get; set; }
|
||
|
public string Name { get; set; } = "";
|
||
|
public IReadOnlyCollection<string> Required { get; set; } = new List<string>();
|
||
|
public IReadOnlyCollection<string> Ignored { get; set; } = new List<string>();
|
||
|
public IReadOnlyCollection<SonarrPreferredTerm> Preferred { get; set; } = new List<SonarrPreferredTerm>();
|
||
|
public bool IncludePreferredWhenRenaming { get; set; }
|
||
|
public int IndexerId { get; set; }
|
||
|
public IReadOnlyCollection<int> Tags { get; set; } = new List<int>();
|
||
4 years ago
|
}
|