Fixed: Avoid default category on existing Transmission configurations

Co-authored-by: Mark McDowall <mark@mcdowall.ca>

(cherry picked from commit bd656ae7f66fc9224ef2a57857152ee5d54d54f8)
This commit is contained in:
Bogdan 2024-11-27 23:55:50 +02:00 committed by servarr
commit 280c0f05cf

View file

@ -50,6 +50,18 @@ namespace NzbDrone.Core.Download.Clients.Transmission
MusicCategory = musicCategory;
}
// 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; }