2011-02-11 02:22:29 +01:00
|
|
|
|
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 04:44:01 +02:00
|
|
|
|
public SelectList PrioritySelectList =
|
|
|
|
|
new SelectList(new[] {"Default", "Paused", "Low", "Normal", "High", "Top"});
|
|
|
|
|
|
2011-02-11 02:22:29 +01:00
|
|
|
|
[Required]
|
|
|
|
|
[Range(15, 120, ErrorMessage = "Must be between 15 and 120 minutes")]
|
|
|
|
|
[DataType(DataType.Text)]
|
|
|
|
|
[DisplayName("Sync Frequency")]
|
2011-04-10 04:44:01 +02:00
|
|
|
|
public int SyncFrequency { get; set; }
|
2011-02-11 02:22:29 +01:00
|
|
|
|
|
|
|
|
|
[DisplayName("Download Propers")]
|
2011-04-10 04:44:01 +02:00
|
|
|
|
public bool DownloadPropers { get; set; }
|
2011-02-11 02:22:29 +01:00
|
|
|
|
|
2011-04-10 04:44:01 +02:00
|
|
|
|
[Required(ErrorMessage = "Please enter a valid number")]
|
2011-02-11 02:22:29 +01:00
|
|
|
|
[DataType(DataType.Text)]
|
|
|
|
|
[DisplayName("Retention")]
|
2011-04-10 04:44:01 +02:00
|
|
|
|
public int Retention { get; set; }
|
2011-02-11 02:22:29 +01:00
|
|
|
|
|
2011-04-10 04:44:01 +02:00
|
|
|
|
[Required(ErrorMessage = "Please enter a valid host")]
|
2011-02-11 02:22:29 +01:00
|
|
|
|
[DataType(DataType.Text)]
|
|
|
|
|
[DisplayName("SABnzbd Host")]
|
2011-04-10 04:44:01 +02:00
|
|
|
|
public String SabHost { get; set; }
|
2011-02-11 02:22:29 +01:00
|
|
|
|
|
|
|
|
|
[Required(ErrorMessage = "Please enter a valid port")]
|
|
|
|
|
[DataType(DataType.Text)]
|
|
|
|
|
[DisplayName("SABnzbd Port")]
|
2011-04-10 04:44:01 +02:00
|
|
|
|
public int SabPort { get; set; }
|
2011-02-11 02:22:29 +01:00
|
|
|
|
|
|
|
|
|
[DataType(DataType.Text)]
|
|
|
|
|
[DisplayName("SABnzbd API Key")]
|
2011-02-15 02:20:17 +01:00
|
|
|
|
[DisplayFormat(ConvertEmptyStringToNull = false)]
|
2011-04-10 04:44:01 +02:00
|
|
|
|
public String SabApiKey { get; set; }
|
2011-02-11 02:22:29 +01:00
|
|
|
|
|
|
|
|
|
[DataType(DataType.Text)]
|
|
|
|
|
[DisplayName("SABnzbd Username")]
|
2011-02-15 02:20:17 +01:00
|
|
|
|
[DisplayFormat(ConvertEmptyStringToNull = false)]
|
2011-04-10 04:44:01 +02:00
|
|
|
|
public String SabUsername { get; set; }
|
2011-02-11 02:22:29 +01:00
|
|
|
|
|
|
|
|
|
[DataType(DataType.Text)]
|
|
|
|
|
[DisplayName("SABnzbd Password")]
|
2011-02-15 02:20:17 +01:00
|
|
|
|
[DisplayFormat(ConvertEmptyStringToNull = false)]
|
2011-04-10 04:44:01 +02:00
|
|
|
|
public String SabPassword { get; set; }
|
2011-02-11 02:22:29 +01:00
|
|
|
|
|
|
|
|
|
[DataType(DataType.Text)]
|
2011-02-15 02:20:17 +01:00
|
|
|
|
[DisplayFormat(ConvertEmptyStringToNull = false)]
|
2011-03-06 23:27:52 +01:00
|
|
|
|
[DisplayName("SABnzbd TV Category")]
|
2011-04-10 04:44:01 +02:00
|
|
|
|
public String SabTvCategory { get; set; }
|
2011-02-11 02:22:29 +01:00
|
|
|
|
|
|
|
|
|
[Required(ErrorMessage = "Please select a valid priority")]
|
|
|
|
|
[DisplayName("SABnzbd Priority")]
|
2011-04-10 04:44:01 +02:00
|
|
|
|
public SabnzbdPriorityType SabTvPriority { get; set; }
|
2011-03-22 04:51:03 +01:00
|
|
|
|
|
|
|
|
|
[DisplayName("Use Blackhole")]
|
2011-04-10 04:44:01 +02:00
|
|
|
|
public bool UseBlackHole { get; set; }
|
2011-03-22 04:51:03 +01:00
|
|
|
|
|
|
|
|
|
[DataType(DataType.Text)]
|
|
|
|
|
[DisplayFormat(ConvertEmptyStringToNull = false)]
|
|
|
|
|
[DisplayName("Blackhole Directory")]
|
2011-04-10 04:44:01 +02:00
|
|
|
|
public String BlackholeDirectory { get; set; }
|
2011-02-11 02:22:29 +01:00
|
|
|
|
}
|
|
|
|
|
}
|