mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-14 17:13:49 -07:00
Validation is working on Settings -> Indexers again.
This commit is contained in:
parent
11db27f6ac
commit
1a5b20a48b
7 changed files with 263 additions and 44 deletions
|
@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using NzbDrone.Core.Repository;
|
||||
using NzbDrone.Web.Helpers.Validation;
|
||||
|
||||
namespace NzbDrone.Web.Models
|
||||
{
|
||||
|
@ -12,48 +13,56 @@ namespace NzbDrone.Web.Models
|
|||
[DisplayName("Username")]
|
||||
[Description("Username for NZB Matrix")]
|
||||
[DisplayFormat(ConvertEmptyStringToNull = false)]
|
||||
[RequiredIf("NzbMatrixEnabled", true, ErrorMessage = "USername Required when NZBMatrix is enabled")]
|
||||
public String NzbMatrixUsername { get; set; }
|
||||
|
||||
[DataType(DataType.Text)]
|
||||
[DisplayName("API Key")]
|
||||
[Description("API Key for NZB Matrix")]
|
||||
[DisplayFormat(ConvertEmptyStringToNull = false)]
|
||||
[RequiredIf("NzbMatrixEnabled", true, ErrorMessage = "API Key Required when NZBMatrix is enabled")]
|
||||
public String NzbMatrixApiKey { get; set; }
|
||||
|
||||
[DataType(DataType.Text)]
|
||||
[DisplayName("UID")]
|
||||
[Description("User ID for Nzbs.org")]
|
||||
[DisplayFormat(ConvertEmptyStringToNull = false)]
|
||||
[RequiredIf("NzbsOrgEnabled", true, ErrorMessage = "UID Required when Nzbs.org is enabled")]
|
||||
public String NzbsOrgUId { get; set; }
|
||||
|
||||
[DataType(DataType.Text)]
|
||||
[DisplayName("Hash")]
|
||||
[Description("Hash for Nzbs.org")]
|
||||
[DisplayFormat(ConvertEmptyStringToNull = false)]
|
||||
[RequiredIf("NzbsOrgEnabled", true, ErrorMessage = "Hash Required when Nzbs.org is enabled")]
|
||||
public String NzbsOrgHash { get; set; }
|
||||
|
||||
[DataType(DataType.Text)]
|
||||
[DisplayName("UID")]
|
||||
[Description("User ID for NZBsRus")]
|
||||
[DisplayFormat(ConvertEmptyStringToNull = false)]
|
||||
[RequiredIf("NzbsRUsEnabled", true, ErrorMessage = "UID Required when NzbsRus is enabled")]
|
||||
public String NzbsrusUId { get; set; }
|
||||
|
||||
[DataType(DataType.Text)]
|
||||
[DisplayName("Hash")]
|
||||
[Description("Hash for NZBsRus")]
|
||||
[DisplayFormat(ConvertEmptyStringToNull = false)]
|
||||
[RequiredIf("NzbsRUsEnabled", true, ErrorMessage = "Hash Required when NzbsRus is enabled")]
|
||||
public String NzbsrusHash { get; set; }
|
||||
|
||||
[DataType(DataType.Text)]
|
||||
[DisplayName("Username")]
|
||||
[Description("Username for Newzbin")]
|
||||
[DisplayFormat(ConvertEmptyStringToNull = false)]
|
||||
[RequiredIf("NewzbinEnabled", true, ErrorMessage = "Username Required when Newzbin is enabled")]
|
||||
public String NewzbinUsername { get; set; }
|
||||
|
||||
[DataType(DataType.Text)]
|
||||
[DisplayName("Password")]
|
||||
[Description("Password for Newzbin")]
|
||||
[DisplayFormat(ConvertEmptyStringToNull = false)]
|
||||
[RequiredIf("NewzbinEnabled", true, ErrorMessage = "Password Required when Newzbin is enabled")]
|
||||
public String NewzbinPassword { get; set; }
|
||||
|
||||
[DisplayName("NZBs.org")]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue