2013-05-20 01:17:32 +02:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using NzbDrone.Core.Annotations;
|
|
|
|
|
|
|
|
|
|
namespace NzbDrone.Core.Notifications.Xbmc
|
|
|
|
|
{
|
|
|
|
|
public class XbmcSettings : INotifcationSettings
|
|
|
|
|
{
|
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; }
|
|
|
|
|
|
2013-05-20 06:19:54 +02: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 01:17:32 +02:00
|
|
|
|
public Boolean UpdateLibrary { get; set; }
|
|
|
|
|
|
2013-05-20 06:19:54 +02:00
|
|
|
|
[FieldDefinition(6, Label = "Clean Library", HelpText = "Clean Library after update?", Type = FieldType.Checkbox)]
|
2013-05-20 01:17:32 +02:00
|
|
|
|
public Boolean CleanLibrary { get; set; }
|
|
|
|
|
|
2013-05-20 06:19:54 +02:00
|
|
|
|
[FieldDefinition(7, 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; }
|
|
|
|
|
|
|
|
|
|
public bool IsValid
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return !string.IsNullOrWhiteSpace(Host) && Port > 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|