1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-16 11:37:58 +02:00
Sonarr/NzbDrone.Core/Notifications/Xbmc/XbmcSettings.cs

48 lines
1.6 KiB
C#
Raw Normal View History

2013-05-20 02:17:32 +03:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
2013-06-12 09:45:25 +03:00
using Newtonsoft.Json;
2013-05-20 02:17:32 +03:00
using NzbDrone.Core.Annotations;
namespace NzbDrone.Core.Notifications.Xbmc
{
public class XbmcSettings : INotifcationSettings
{
2013-05-20 07:19:54 +03:00
[FieldDefinition(0, Label = "Host")]
2013-05-20 02:17:32 +03:00
public String Host { get; set; }
2013-05-20 07:19:54 +03:00
[FieldDefinition(1, Label = "Port")]
2013-05-20 02:17:32 +03:00
public Int32 Port { get; set; }
2013-05-20 07:19:54 +03:00
[FieldDefinition(2, Label = "Username")]
2013-05-20 02:17:32 +03:00
public String Username { get; set; }
2013-05-20 07:19:54 +03:00
[FieldDefinition(3, Label = "Password", Type = FieldType.Password)]
2013-05-20 02:17:32 +03:00
public String Password { get; set; }
2013-05-20 07:19:54 +03:00
[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)]
2013-05-20 02:17:32 +03:00
public Boolean UpdateLibrary { get; set; }
2013-05-20 07:19:54 +03:00
[FieldDefinition(6, Label = "Clean Library", HelpText = "Clean Library after update?", Type = FieldType.Checkbox)]
2013-05-20 02:17:32 +03:00
public Boolean CleanLibrary { get; set; }
2013-05-20 07:19:54 +03:00
[FieldDefinition(7, Label = "Always Update", HelpText = "Update Library even when a video is playing?", Type = FieldType.Checkbox)]
2013-05-20 02:17:32 +03:00
public Boolean AlwaysUpdate { get; set; }
2013-06-12 09:45:25 +03:00
[JsonIgnore]
public String Address { get { return String.Format("{0}:{1}", Host, Port); } }
2013-05-20 02:17:32 +03:00
public bool IsValid
{
get
{
return !string.IsNullOrWhiteSpace(Host) && Port > 0;
}
}
}
}