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.
Lidarr/NzbDrone.Core/Notifications/Xbmc/XbmcSettings.cs

48 lines
1.6 KiB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
12 years ago
using Newtonsoft.Json;
using NzbDrone.Core.Annotations;
namespace NzbDrone.Core.Notifications.Xbmc
{
public class XbmcSettings : INotifcationSettings
{
[FieldDefinition(0, Label = "Host")]
public String Host { get; set; }
[FieldDefinition(1, Label = "Port")]
public Int32 Port { get; set; }
[FieldDefinition(2, Label = "Username")]
public String Username { get; set; }
[FieldDefinition(3, Label = "Password", Type = FieldType.Password)]
public String Password { get; set; }
[FieldDefinition(4, Label = "GUI Notification", HelpText = "Show GUI notifications?", Type = FieldType.Checkbox)]
public Boolean Notify { get; set; }
[FieldDefinition(5, Label = "Update Library", HelpText = "Update Library on Download & Rename?", Type = FieldType.Checkbox)]
public Boolean UpdateLibrary { get; set; }
[FieldDefinition(6, Label = "Clean Library", HelpText = "Clean Library after update?", Type = FieldType.Checkbox)]
public Boolean CleanLibrary { get; set; }
[FieldDefinition(7, Label = "Always Update", HelpText = "Update Library even when a video is playing?", Type = FieldType.Checkbox)]
public Boolean AlwaysUpdate { get; set; }
12 years ago
[JsonIgnore]
public String Address { get { return String.Format("{0}:{1}", Host, Port); } }
public bool IsValid
{
get
{
return !string.IsNullOrWhiteSpace(Host) && Port > 0;
}
}
}
}