mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-20 21:55:03 -04:00
New: Implemented Torrent Download Clients: uTorrent, Transmission and Deluge. And several public and private Torrent Indexers.
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using FluentValidation;
|
||||
using FluentValidation.Results;
|
||||
using NzbDrone.Core.Annotations;
|
||||
using NzbDrone.Core.ThingiProvider;
|
||||
using NzbDrone.Core.Validation;
|
||||
|
||||
namespace NzbDrone.Core.Indexers.BitMeTv
|
||||
{
|
||||
public class BitMeTvSettingsValidator : AbstractValidator<BitMeTvSettings>
|
||||
{
|
||||
public BitMeTvSettingsValidator()
|
||||
{
|
||||
RuleFor(c => c.BaseUrl).ValidRootUrl();
|
||||
RuleFor(c => c.UserId).NotEmpty();
|
||||
RuleFor(c => c.RssPasskey).NotEmpty();
|
||||
}
|
||||
}
|
||||
|
||||
public class BitMeTvSettings : IProviderConfig
|
||||
{
|
||||
private static readonly BitMeTvSettingsValidator validator = new BitMeTvSettingsValidator();
|
||||
|
||||
public BitMeTvSettings()
|
||||
{
|
||||
BaseUrl = "http://www.bitmetv.org";
|
||||
}
|
||||
|
||||
[FieldDefinition(0, Label = "Website URL")]
|
||||
public String BaseUrl { get; set; }
|
||||
|
||||
[FieldDefinition(1, Label = "UserId")]
|
||||
public String UserId { get; set; }
|
||||
|
||||
[FieldDefinition(2, Label = "RSS Passkey")]
|
||||
public String RssPasskey { get; set; }
|
||||
|
||||
public ValidationResult Validate()
|
||||
{
|
||||
return validator.Validate(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user