1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-14 15:03:42 +01:00
Radarr/NzbDrone.Core/Notifications/Xbmc/XbmcSettings.cs

55 lines
1.8 KiB
C#
Raw Normal View History

2013-05-20 01:17:32 +02:00
using System;
using System.ComponentModel;
2013-06-12 08:45:25 +02:00
using Newtonsoft.Json;
2013-05-20 01:17:32 +02:00
using NzbDrone.Core.Annotations;
namespace NzbDrone.Core.Notifications.Xbmc
{
public class XbmcSettings : INotifcationSettings
{
public XbmcSettings()
{
DisplayTime = 5;
}
2013-05-20 06:19:54 +02:00
[FieldDefinition(0, Label = "Host")]
2013-05-20 01:17:32 +02:00
public String Host { get; set; }
2013-05-20 06:19:54 +02:00
[FieldDefinition(1, Label = "Port")]
2013-05-20 01:17:32 +02:00
public Int32 Port { get; set; }
2013-05-20 06:19:54 +02:00
[FieldDefinition(2, Label = "Username")]
2013-05-20 01:17:32 +02:00
public String Username { get; set; }
2013-05-20 06:19:54 +02:00
[FieldDefinition(3, Label = "Password", Type = FieldType.Password)]
2013-05-20 01:17:32 +02:00
public String Password { get; set; }
[DefaultValue(5)]
[FieldDefinition(4, Label = "Display Time", HelpText = "How long the notification will be displayed for (In seconds)")]
public Int32 DisplayTime { get; set; }
[FieldDefinition(5, Label = "GUI Notification", HelpText = "Show GUI notifications?", Type = FieldType.Checkbox)]
2013-05-20 06:19:54 +02:00
public Boolean Notify { get; set; }
[FieldDefinition(6, Label = "Update Library", HelpText = "Update Library on Download & Rename?", Type = FieldType.Checkbox)]
2013-05-20 01:17:32 +02:00
public Boolean UpdateLibrary { get; set; }
[FieldDefinition(7, Label = "Clean Library", HelpText = "Clean Library after update?", Type = FieldType.Checkbox)]
2013-05-20 01:17:32 +02:00
public Boolean CleanLibrary { get; set; }
[FieldDefinition(8, Label = "Always Update", HelpText = "Update Library even when a video is playing?", Type = FieldType.Checkbox)]
2013-05-20 01:17:32 +02:00
public Boolean AlwaysUpdate { get; set; }
2013-06-12 08:45:25 +02:00
[JsonIgnore]
public String Address { get { return String.Format("{0}:{1}", Host, Port); } }
2013-05-20 01:17:32 +02:00
public bool IsValid
{
get
{
return !string.IsNullOrWhiteSpace(Host) && Port > 0;
}
}
}
}