|
|
|
@ -1,3 +1,4 @@
|
|
|
|
|
using System.Text.Json.Serialization;
|
|
|
|
|
using System.Text.RegularExpressions;
|
|
|
|
|
using FluentValidation;
|
|
|
|
|
using NzbDrone.Common.Extensions;
|
|
|
|
@ -27,6 +28,7 @@ namespace NzbDrone.Core.Download.Clients.Transmission
|
|
|
|
|
{
|
|
|
|
|
private static readonly TransmissionSettingsValidator Validator = new ();
|
|
|
|
|
|
|
|
|
|
// This constructor is used when creating a new instance, such as the user adding a new Transmission client.
|
|
|
|
|
public TransmissionSettings()
|
|
|
|
|
{
|
|
|
|
|
Host = "localhost";
|
|
|
|
@ -35,6 +37,18 @@ namespace NzbDrone.Core.Download.Clients.Transmission
|
|
|
|
|
TvCategory = "tv-sonarr";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TODO: Remove this in v5
|
|
|
|
|
// This constructor is used when deserializing from JSON, it will set the
|
|
|
|
|
// category to the deserialized value, defaulting to null.
|
|
|
|
|
[JsonConstructor]
|
|
|
|
|
public TransmissionSettings(string tvCategory = null)
|
|
|
|
|
{
|
|
|
|
|
Host = "localhost";
|
|
|
|
|
Port = 9091;
|
|
|
|
|
UrlBase = "/transmission/";
|
|
|
|
|
TvCategory = tvCategory;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[FieldDefinition(0, Label = "Host", Type = FieldType.Textbox)]
|
|
|
|
|
public string Host { get; set; }
|
|
|
|
|
|
|
|
|
|