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