2011-02-10 17:22:29 -08:00
|
|
|
using System;
|
|
|
|
using System.ComponentModel;
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
using System.Web.Mvc;
|
|
|
|
using NzbDrone.Core.Model;
|
|
|
|
|
|
|
|
namespace NzbDrone.Web.Models
|
|
|
|
{
|
2011-05-17 20:39:26 -07:00
|
|
|
public class SabnzbdSettingsModel
|
2011-02-10 17:22:29 -08:00
|
|
|
{
|
2011-04-09 19:44:01 -07:00
|
|
|
public SelectList PrioritySelectList =
|
|
|
|
new SelectList(new[] {"Default", "Paused", "Low", "Normal", "High", "Top"});
|
|
|
|
|
|
|
|
[Required(ErrorMessage = "Please enter a valid host")]
|
2011-02-10 17:22:29 -08:00
|
|
|
[DataType(DataType.Text)]
|
|
|
|
[DisplayName("SABnzbd Host")]
|
2011-04-26 22:09:24 -07:00
|
|
|
[Description("Hostname or IP Address running SABnzbd")]
|
2011-04-09 19:44:01 -07:00
|
|
|
public String SabHost { get; set; }
|
2011-02-10 17:22:29 -08:00
|
|
|
|
|
|
|
[Required(ErrorMessage = "Please enter a valid port")]
|
|
|
|
[DataType(DataType.Text)]
|
|
|
|
[DisplayName("SABnzbd Port")]
|
2011-04-26 22:09:24 -07:00
|
|
|
[Description("Port for SABnzbd web interface")]
|
2011-04-09 19:44:01 -07:00
|
|
|
public int SabPort { get; set; }
|
2011-02-10 17:22:29 -08:00
|
|
|
|
|
|
|
[DataType(DataType.Text)]
|
|
|
|
[DisplayName("SABnzbd API Key")]
|
2011-04-26 22:09:24 -07:00
|
|
|
[Description("API Key for SABNzbd, Found in Config: General")]
|
2011-02-14 17:20:17 -08:00
|
|
|
[DisplayFormat(ConvertEmptyStringToNull = false)]
|
2011-04-09 19:44:01 -07:00
|
|
|
public String SabApiKey { get; set; }
|
2011-02-10 17:22:29 -08:00
|
|
|
|
|
|
|
[DataType(DataType.Text)]
|
|
|
|
[DisplayName("SABnzbd Username")]
|
2011-04-26 22:09:24 -07:00
|
|
|
[Description("Username for SABnzbd WebUI (Not Required when using APIKey)")]
|
2011-02-14 17:20:17 -08:00
|
|
|
[DisplayFormat(ConvertEmptyStringToNull = false)]
|
2011-04-09 19:44:01 -07:00
|
|
|
public String SabUsername { get; set; }
|
2011-02-10 17:22:29 -08:00
|
|
|
|
|
|
|
[DataType(DataType.Text)]
|
|
|
|
[DisplayName("SABnzbd Password")]
|
2011-04-26 22:09:24 -07:00
|
|
|
[Description("Password for SABnzbd WebUI (Not required when using APIKey)")]
|
2011-02-14 17:20:17 -08:00
|
|
|
[DisplayFormat(ConvertEmptyStringToNull = false)]
|
2011-04-09 19:44:01 -07:00
|
|
|
public String SabPassword { get; set; }
|
2011-02-10 17:22:29 -08:00
|
|
|
|
|
|
|
[DataType(DataType.Text)]
|
2011-02-14 17:20:17 -08:00
|
|
|
[DisplayFormat(ConvertEmptyStringToNull = false)]
|
2011-03-06 14:27:52 -08:00
|
|
|
[DisplayName("SABnzbd TV Category")]
|
2011-04-26 22:09:24 -07:00
|
|
|
[Description("Category to use when sending NZBs to SABnzbd")]
|
2011-04-09 19:44:01 -07:00
|
|
|
public String SabTvCategory { get; set; }
|
2011-02-10 17:22:29 -08:00
|
|
|
|
|
|
|
[Required(ErrorMessage = "Please select a valid priority")]
|
|
|
|
[DisplayName("SABnzbd Priority")]
|
2011-04-26 22:09:24 -07:00
|
|
|
[Description("Priority to use when sending NZBs to SABnzbd")]
|
2011-04-09 19:44:01 -07:00
|
|
|
public SabnzbdPriorityType SabTvPriority { get; set; }
|
2011-06-07 00:08:37 -07:00
|
|
|
|
|
|
|
[DisplayName("SABnzbd TV Directory")]
|
|
|
|
[Description("The directory where SABnzbd stores TV shows (NzbDrone will sort them for you)")]
|
|
|
|
[DisplayFormat(ConvertEmptyStringToNull = false)]
|
|
|
|
public string SabDropDirectory { get; set; }
|
2011-06-08 18:45:06 -07:00
|
|
|
|
2011-08-26 10:45:59 -07:00
|
|
|
public SelectList SabTvCategorySelectList { get; set; }
|
2011-02-10 17:22:29 -08:00
|
|
|
}
|
|
|
|
}
|