2011-02-11 02:22:29 +01:00
|
|
|
|
using System;
|
2013-01-24 08:31:41 +01:00
|
|
|
|
using System.Collections.Generic;
|
2011-02-11 02:22:29 +01:00
|
|
|
|
using System.ComponentModel;
|
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
using System.Web.Mvc;
|
|
|
|
|
using NzbDrone.Core.Model;
|
2013-01-24 08:31:41 +01:00
|
|
|
|
using NzbDrone.Core.Model.Nzbget;
|
2012-01-19 05:05:03 +01:00
|
|
|
|
using NzbDrone.Core.Model.Sabnzbd;
|
2012-02-25 22:21:41 +01:00
|
|
|
|
using NzbDrone.Web.Helpers.Validation;
|
2011-02-11 02:22:29 +01:00
|
|
|
|
|
|
|
|
|
namespace NzbDrone.Web.Models
|
|
|
|
|
{
|
2012-01-28 22:43:44 +01:00
|
|
|
|
public class DownloadClientSettingsModel
|
2011-02-11 02:22:29 +01:00
|
|
|
|
{
|
2013-01-24 08:31:41 +01:00
|
|
|
|
public SelectList SabPrioritySelectList =
|
2012-02-02 00:25:38 +01:00
|
|
|
|
new SelectList(new[] {"Default", "Paused", "Low", "Normal", "High", "Force"});
|
2011-04-10 04:44:01 +02:00
|
|
|
|
|
2013-01-24 08:31:41 +01:00
|
|
|
|
public SelectList NzbgetPrioritySelectList { get; set; }
|
|
|
|
|
|
2011-02-11 02:22:29 +01:00
|
|
|
|
[DataType(DataType.Text)]
|
|
|
|
|
[DisplayName("SABnzbd Host")]
|
2011-04-27 07:09:24 +02:00
|
|
|
|
[Description("Hostname or IP Address running SABnzbd")]
|
2012-02-25 22:21:41 +01:00
|
|
|
|
[RequiredIf("DownloadClient", (int)DownloadClientType.Sabnzbd, ErrorMessage = "Required when Download Client is SABnzbd")]
|
2011-04-10 04:44:01 +02:00
|
|
|
|
public String SabHost { get; set; }
|
2011-02-11 02:22:29 +01:00
|
|
|
|
|
|
|
|
|
[DataType(DataType.Text)]
|
|
|
|
|
[DisplayName("SABnzbd Port")]
|
2011-04-27 07:09:24 +02:00
|
|
|
|
[Description("Port for SABnzbd web interface")]
|
2012-02-25 22:21:41 +01:00
|
|
|
|
[RequiredIf("DownloadClient", (int)DownloadClientType.Sabnzbd, ErrorMessage = "Required when Download Client is SABnzbd")]
|
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-04-27 07:09:24 +02:00
|
|
|
|
[Description("API Key for SABNzbd, Found in Config: General")]
|
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-04-27 07:09:24 +02:00
|
|
|
|
[Description("Username for SABnzbd WebUI (Not Required when using APIKey)")]
|
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-04-27 07:09:24 +02:00
|
|
|
|
[Description("Password for SABnzbd WebUI (Not required when using APIKey)")]
|
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-27 07:09:24 +02:00
|
|
|
|
[Description("Category to use when sending NZBs to SABnzbd")]
|
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")]
|
2012-11-23 03:56:27 +01:00
|
|
|
|
[DisplayName("SABnzbd Backlog Priority")]
|
|
|
|
|
[Description("Priority to use when sending episodes older than 7 days to SABnzbd")]
|
|
|
|
|
public SabPriorityType SabBacklogTvPriority { get; set; }
|
|
|
|
|
|
|
|
|
|
[Required(ErrorMessage = "Please select a valid priority")]
|
|
|
|
|
[DisplayName("SABnzbd Recent Priority")]
|
|
|
|
|
[Description("Priority to use when sending episodes newer than 7 days to SABnzbd")]
|
|
|
|
|
public SabPriorityType SabRecentTvPriority { get; set; }
|
2011-06-07 09:08:37 +02:00
|
|
|
|
|
2012-02-25 22:21:41 +01:00
|
|
|
|
[Required(ErrorMessage = "Required so NzbDrone can sort downloads")]
|
2012-01-28 22:43:44 +01:00
|
|
|
|
[DisplayName("Download Client TV Directory")]
|
2012-02-25 22:21:41 +01:00
|
|
|
|
[Description("The directory where your download client downloads TV shows to")]
|
2011-06-07 09:08:37 +02:00
|
|
|
|
[DisplayFormat(ConvertEmptyStringToNull = false)]
|
2012-01-28 22:43:44 +01:00
|
|
|
|
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 22:21:41 +01:00
|
|
|
|
[RequiredIf("DownloadClient", (int)DownloadClientType.Blackhole, ErrorMessage = "Required when Download Client is Blackhole")]
|
2012-01-28 22:43:44 +01:00
|
|
|
|
public string BlackholeDirectory { get; set; }
|
|
|
|
|
|
|
|
|
|
[DisplayName("Download Client")]
|
|
|
|
|
[Description("What method do you download NZBs with?")]
|
|
|
|
|
public int DownloadClient { get; set; }
|
2011-06-09 03:45:06 +02:00
|
|
|
|
|
2012-08-30 04:33:57 +02:00
|
|
|
|
[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; }
|
|
|
|
|
|
2013-01-23 06:08:21 +01:00
|
|
|
|
[DisplayName("Use Scene Name")]
|
|
|
|
|
[Description("Use Scene name when adding NZB to queue?")]
|
|
|
|
|
public Boolean UseSceneName { get; set; }
|
|
|
|
|
|
2013-01-24 08:31:41 +01:00
|
|
|
|
[DataType(DataType.Text)]
|
|
|
|
|
[DisplayName("Nzbget Host")]
|
|
|
|
|
[Description("Hostname or IP Address running Nzbget")]
|
|
|
|
|
[RequiredIf("DownloadClient", (int)DownloadClientType.Nzbget, ErrorMessage = "Required when Download Client is Nzbget")]
|
|
|
|
|
public String NzbgetHost { get; set; }
|
|
|
|
|
|
|
|
|
|
[DataType(DataType.Text)]
|
|
|
|
|
[DisplayName("Nzbget Port")]
|
|
|
|
|
[Description("Port for Nzbget web interface")]
|
|
|
|
|
[RequiredIf("DownloadClient", (int)DownloadClientType.Nzbget, ErrorMessage = "Required when Download Client is Nzbget")]
|
|
|
|
|
public int NzbgetPort { get; set; }
|
|
|
|
|
|
|
|
|
|
[DataType(DataType.Text)]
|
|
|
|
|
[DisplayName("Nzbget Username")]
|
|
|
|
|
[Description("Username for Nzbget")]
|
|
|
|
|
[DisplayFormat(ConvertEmptyStringToNull = false)]
|
|
|
|
|
public String NzbgetUsername { get; set; }
|
|
|
|
|
|
|
|
|
|
[DataType(DataType.Text)]
|
|
|
|
|
[DisplayName("Nzbget Password")]
|
|
|
|
|
[Description("Password for Nzbget")]
|
|
|
|
|
[DisplayFormat(ConvertEmptyStringToNull = false)]
|
|
|
|
|
public String NzbgetPassword { get; set; }
|
|
|
|
|
|
|
|
|
|
[DataType(DataType.Text)]
|
|
|
|
|
[DisplayFormat(ConvertEmptyStringToNull = false)]
|
|
|
|
|
[DisplayName("Nzbget TV Category")]
|
|
|
|
|
[Description("Category to use when sending NZBs to Nzbget")]
|
|
|
|
|
public String NzbgetTvCategory { get; set; }
|
|
|
|
|
|
|
|
|
|
[Required(ErrorMessage = "Please select a valid priority")]
|
|
|
|
|
[DisplayName("Nzbget Backlog Priority")]
|
|
|
|
|
[Description("Priority to use when sending episodes older than 7 days to Nzbget")]
|
|
|
|
|
public Int32 NzbgetBacklogTvPriority { get; set; }
|
|
|
|
|
|
|
|
|
|
[Required(ErrorMessage = "Please select a valid priority")]
|
|
|
|
|
[DisplayName("Nzbget Recent Priority")]
|
|
|
|
|
[Description("Priority to use when sending episodes newer than 7 days to Nzbget")]
|
|
|
|
|
public Int32 NzbgetRecentTvPriority { get; set; }
|
|
|
|
|
|
2011-08-26 19:45:59 +02:00
|
|
|
|
public SelectList SabTvCategorySelectList { get; set; }
|
2012-01-28 22:43:44 +01:00
|
|
|
|
public SelectList DownloadClientSelectList { get; set; }
|
2011-02-11 02:22:29 +01:00
|
|
|
|
}
|
|
|
|
|
}
|