Lidarr/NzbDrone.Web/Models/DownloadSettingsModel.cs

70 lines
2.3 KiB
C#
Raw Normal View History

using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;
using NzbDrone.Core.Model;
namespace NzbDrone.Web.Models
{
public class DownloadSettingsModel
{
2011-04-10 02:44:01 +00:00
public SelectList PrioritySelectList =
new SelectList(new[] {"Default", "Paused", "Low", "Normal", "High", "Top"});
[Required]
[Range(15, 120, ErrorMessage = "Must be between 15 and 120 minutes")]
[DataType(DataType.Text)]
[DisplayName("Sync Frequency")]
2011-04-10 02:44:01 +00:00
public int SyncFrequency { get; set; }
[DisplayName("Download Propers")]
2011-04-10 02:44:01 +00:00
public bool DownloadPropers { get; set; }
2011-04-10 02:44:01 +00:00
[Required(ErrorMessage = "Please enter a valid number")]
[DataType(DataType.Text)]
[DisplayName("Retention")]
2011-04-10 02:44:01 +00:00
public int Retention { get; set; }
2011-04-10 02:44:01 +00:00
[Required(ErrorMessage = "Please enter a valid host")]
[DataType(DataType.Text)]
[DisplayName("SABnzbd Host")]
2011-04-10 02:44:01 +00:00
public String SabHost { get; set; }
[Required(ErrorMessage = "Please enter a valid port")]
[DataType(DataType.Text)]
[DisplayName("SABnzbd Port")]
2011-04-10 02:44:01 +00:00
public int SabPort { get; set; }
[DataType(DataType.Text)]
[DisplayName("SABnzbd API Key")]
[DisplayFormat(ConvertEmptyStringToNull = false)]
2011-04-10 02:44:01 +00:00
public String SabApiKey { get; set; }
[DataType(DataType.Text)]
[DisplayName("SABnzbd Username")]
[DisplayFormat(ConvertEmptyStringToNull = false)]
2011-04-10 02:44:01 +00:00
public String SabUsername { get; set; }
[DataType(DataType.Text)]
[DisplayName("SABnzbd Password")]
[DisplayFormat(ConvertEmptyStringToNull = false)]
2011-04-10 02:44:01 +00:00
public String SabPassword { get; set; }
[DataType(DataType.Text)]
[DisplayFormat(ConvertEmptyStringToNull = false)]
[DisplayName("SABnzbd TV Category")]
2011-04-10 02:44:01 +00:00
public String SabTvCategory { get; set; }
[Required(ErrorMessage = "Please select a valid priority")]
[DisplayName("SABnzbd Priority")]
2011-04-10 02:44:01 +00:00
public SabnzbdPriorityType SabTvPriority { get; set; }
[DisplayName("Use Blackhole")]
2011-04-10 02:44:01 +00:00
public bool UseBlackHole { get; set; }
[DataType(DataType.Text)]
[DisplayFormat(ConvertEmptyStringToNull = false)]
[DisplayName("Blackhole Directory")]
2011-04-10 02:44:01 +00:00
public String BlackholeDirectory { get; set; }
}
}