Radarr/NzbDrone.Web/Models/DownloadClientSettingsModel.cs

82 lines
3.6 KiB
C#
Raw Normal View History

using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;
using NzbDrone.Core.Model;
using NzbDrone.Core.Model.Sabnzbd;
2012-02-25 21:21:41 +00:00
using NzbDrone.Web.Helpers.Validation;
namespace NzbDrone.Web.Models
{
public class DownloadClientSettingsModel
{
2011-04-10 02:44:01 +00:00
public SelectList PrioritySelectList =
new SelectList(new[] {"Default", "Paused", "Low", "Normal", "High", "Force"});
2011-04-10 02:44:01 +00:00
[DataType(DataType.Text)]
[DisplayName("SABnzbd Host")]
[Description("Hostname or IP Address running SABnzbd")]
2012-02-25 21:21:41 +00:00
[RequiredIf("DownloadClient", (int)DownloadClientType.Sabnzbd, ErrorMessage = "Required when Download Client is SABnzbd")]
2011-04-10 02:44:01 +00:00
public String SabHost { get; set; }
[DataType(DataType.Text)]
[DisplayName("SABnzbd Port")]
[Description("Port for SABnzbd web interface")]
2012-02-25 21:21:41 +00:00
[RequiredIf("DownloadClient", (int)DownloadClientType.Sabnzbd, ErrorMessage = "Required when Download Client is SABnzbd")]
2011-04-10 02:44:01 +00:00
public int SabPort { get; set; }
[DataType(DataType.Text)]
[DisplayName("SABnzbd API Key")]
[Description("API Key for SABNzbd, Found in Config: General")]
[DisplayFormat(ConvertEmptyStringToNull = false)]
2011-04-10 02:44:01 +00:00
public String SabApiKey { get; set; }
[DataType(DataType.Text)]
[DisplayName("SABnzbd Username")]
[Description("Username for SABnzbd WebUI (Not Required when using APIKey)")]
[DisplayFormat(ConvertEmptyStringToNull = false)]
2011-04-10 02:44:01 +00:00
public String SabUsername { get; set; }
[DataType(DataType.Text)]
[DisplayName("SABnzbd Password")]
[Description("Password for SABnzbd WebUI (Not required when using APIKey)")]
[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")]
[Description("Category to use when sending NZBs to SABnzbd")]
2011-04-10 02:44:01 +00:00
public String SabTvCategory { get; set; }
[Required(ErrorMessage = "Please select a valid priority")]
[DisplayName("SABnzbd Priority")]
[Description("Priority to use when sending NZBs to SABnzbd")]
public SabPriorityType SabTvPriority { get; set; }
2012-02-25 21:21:41 +00:00
[Required(ErrorMessage = "Required so NzbDrone can sort downloads")]
[DisplayName("Download Client TV Directory")]
2012-02-25 21:21:41 +00:00
[Description("The directory where your download client downloads TV shows to")]
[DisplayFormat(ConvertEmptyStringToNull = false)]
public string DownloadClientDropDirectory { get; set; }
[DisplayName("Blackhole Directory")]
[Description("The directory where your download client will pickup NZB files")]
[DisplayFormat(ConvertEmptyStringToNull = false)]
2012-02-25 21:21:41 +00:00
[RequiredIf("DownloadClient", (int)DownloadClientType.Blackhole, ErrorMessage = "Required when Download Client is Blackhole")]
public string BlackholeDirectory { get; set; }
[DisplayName("Download Client")]
[Description("What method do you download NZBs with?")]
public int DownloadClient { get; set; }
[DisplayName("Pneumatic Nzb Directory")]
[Description("Directory to save NZBs for Pneumatic, must be able from XBMC")]
[DisplayFormat(ConvertEmptyStringToNull = false)]
[RequiredIf("DownloadClient", (int)DownloadClientType.Pneumatic, ErrorMessage = "Required when Download Client is Blackhole")]
public string PneumaticDirectory { get; set; }
public SelectList SabTvCategorySelectList { get; set; }
public SelectList DownloadClientSelectList { get; set; }
}
}