2011-02-11 02:22:29 +01:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.ComponentModel;
|
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
using NzbDrone.Core.Repository;
|
2012-02-24 17:22:13 +01:00
|
|
|
|
using NzbDrone.Web.Helpers.Validation;
|
2011-02-11 02:22:29 +01:00
|
|
|
|
|
|
|
|
|
namespace NzbDrone.Web.Models
|
|
|
|
|
{
|
|
|
|
|
public class IndexerSettingsModel
|
|
|
|
|
{
|
|
|
|
|
[DataType(DataType.Text)]
|
2012-07-30 23:21:05 +02:00
|
|
|
|
[DisplayName("User ID")]
|
2011-07-01 22:33:03 +02:00
|
|
|
|
[Description("User ID for NZBsRus")]
|
2011-02-15 02:20:17 +01:00
|
|
|
|
[DisplayFormat(ConvertEmptyStringToNull = false)]
|
2012-07-30 23:21:05 +02:00
|
|
|
|
[RequiredIf("NzbsRUsEnabled", true, ErrorMessage = "User ID Required when NzbsRus is enabled")]
|
2011-04-10 04:44:01 +02:00
|
|
|
|
public String NzbsrusUId { get; set; }
|
2011-02-11 02:22:29 +01:00
|
|
|
|
|
|
|
|
|
[DataType(DataType.Text)]
|
2012-07-30 23:21:05 +02:00
|
|
|
|
[DisplayName("API Key")]
|
|
|
|
|
[Description("API Key for NZBsRus")]
|
2011-02-15 02:20:17 +01:00
|
|
|
|
[DisplayFormat(ConvertEmptyStringToNull = false)]
|
2012-07-30 23:21:05 +02:00
|
|
|
|
[RequiredIf("NzbsRUsEnabled", true, ErrorMessage = "API Key Required when NzbsRus is enabled")]
|
2011-04-10 04:44:01 +02:00
|
|
|
|
public String NzbsrusHash { get; set; }
|
2011-02-11 02:22:29 +01:00
|
|
|
|
|
2012-04-14 08:44:34 +02:00
|
|
|
|
[DataType(DataType.Text)]
|
|
|
|
|
[DisplayName("UID")]
|
|
|
|
|
[Description("UserID for File Sharing Talk")]
|
|
|
|
|
[DisplayFormat(ConvertEmptyStringToNull = false)]
|
|
|
|
|
[RequiredIf("FileSharingTalkEnabled", true, ErrorMessage = "UserID Required when File Sharing Talk is enabled")]
|
|
|
|
|
public String FileSharingTalkUid { get; set; }
|
|
|
|
|
|
|
|
|
|
[DataType(DataType.Text)]
|
|
|
|
|
[DisplayName("Secret")]
|
|
|
|
|
[Description("Password Secret for File Sharing Talk")]
|
|
|
|
|
[DisplayFormat(ConvertEmptyStringToNull = false)]
|
|
|
|
|
[RequiredIf("FileSharingTalkEnabled", true, ErrorMessage = "Password Secret Required when File Sharing Talk is enabled")]
|
|
|
|
|
public String FileSharingTalkSecret { get; set; }
|
|
|
|
|
|
2012-12-18 05:05:07 +01:00
|
|
|
|
[DataType(DataType.Text)]
|
|
|
|
|
[DisplayName("Username")]
|
|
|
|
|
[Description("Username for omgwtfnzbs")]
|
|
|
|
|
[DisplayFormat(ConvertEmptyStringToNull = false)]
|
|
|
|
|
[RequiredIf("OmgwtfnzbsEnabled", true, ErrorMessage = "Username is required when omgwtfnzbs is enabled")]
|
|
|
|
|
public String OmgwtfnzbsUsername { get; set; }
|
|
|
|
|
|
|
|
|
|
[DataType(DataType.Text)]
|
|
|
|
|
[DisplayName("API Key")]
|
|
|
|
|
[Description("API Key for omgwtfnzbs")]
|
|
|
|
|
[DisplayFormat(ConvertEmptyStringToNull = false)]
|
|
|
|
|
[RequiredIf("OmgwtfnzbsEnabled", true, ErrorMessage = "API Key is required when omgwtfnzbs is enabled")]
|
|
|
|
|
public String OmgwtfnzbsApiKey { get; set; }
|
|
|
|
|
|
2011-04-20 01:46:21 +02:00
|
|
|
|
[DisplayName("NZBsRUs")]
|
2011-09-23 02:18:41 +02:00
|
|
|
|
[Description("Enable downloading episodes from NZBsRus")]
|
2011-04-20 01:46:21 +02:00
|
|
|
|
public bool NzbsRUsEnabled { get; set; }
|
|
|
|
|
|
2011-11-13 21:51:15 +01:00
|
|
|
|
[DisplayName("Newznab")]
|
|
|
|
|
[Description("Enable downloading episodes from Newznab Providers")]
|
|
|
|
|
public bool NewznabEnabled { get; set; }
|
|
|
|
|
|
2012-04-14 08:44:34 +02:00
|
|
|
|
[DisplayName("Womble's Index")]
|
|
|
|
|
[Description("Enable downloading episodes from Womble's Index")]
|
|
|
|
|
public bool WomblesEnabled { get; set; }
|
|
|
|
|
|
|
|
|
|
[DisplayName("File Sharing Talk")]
|
|
|
|
|
[Description("Enable downloading episodes from File Sharing Talk")]
|
|
|
|
|
public bool FileSharingTalkEnabled { get; set; }
|
|
|
|
|
|
2012-04-15 02:04:08 +02:00
|
|
|
|
[DisplayName("NzbIndex")]
|
|
|
|
|
[Description("Enable downloading episodes from NzbIndex")]
|
|
|
|
|
public bool NzbIndexEnabled { get; set; }
|
|
|
|
|
|
|
|
|
|
[DisplayName("NzbClub")]
|
|
|
|
|
[Description("Enable downloading episodes from NzbClub")]
|
|
|
|
|
public bool NzbClubEnabled { get; set; }
|
|
|
|
|
|
2012-12-18 05:05:07 +01:00
|
|
|
|
[DisplayName("omgwtfnzbs")]
|
|
|
|
|
[Description("Enable downloading episodes from omgwtfnzbs")]
|
|
|
|
|
public bool OmgwtfnzbsEnabled { get; set; }
|
|
|
|
|
|
2012-12-22 20:44:47 +01:00
|
|
|
|
[DisplayName("nzbx")]
|
|
|
|
|
[Description("Enable downloading episodes from nzbx")]
|
|
|
|
|
public bool NzbxEnabled { get; set; }
|
|
|
|
|
|
2012-02-17 10:32:33 +01:00
|
|
|
|
[Required(ErrorMessage = "Please enter a valid number of days")]
|
|
|
|
|
[DataType(DataType.Text)]
|
|
|
|
|
[DisplayName("Retention")]
|
|
|
|
|
[Description("Usenet provider retention in days (0 = unlimited)")]
|
|
|
|
|
public int Retention { get; set; }
|
|
|
|
|
|
2012-10-07 21:16:43 +02:00
|
|
|
|
[DisplayName("RSS Sync Interval")]
|
|
|
|
|
[Description("Check for new episodes every X minutes")]
|
|
|
|
|
[DisplayFormat(ConvertEmptyStringToNull = false)]
|
|
|
|
|
[Required(AllowEmptyStrings = false, ErrorMessage = "You must enter a valid time in minutes")]
|
|
|
|
|
[Range(15, 240, ErrorMessage = "Interval must be between 15 and 240 minutes")]
|
|
|
|
|
public int RssSyncInterval { get; set; }
|
|
|
|
|
|
2011-11-13 21:51:15 +01:00
|
|
|
|
public List<NewznabDefinition> NewznabDefinitions { get; set; }
|
2011-02-11 02:22:29 +01:00
|
|
|
|
}
|
|
|
|
|
}
|