mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-14 11:23:42 +02:00
DownloadProtocol is an integer for release/push
This commit is contained in:
parent
8abfc7609e
commit
cd26b8f728
@ -34,7 +34,7 @@ public ReleasePushModule(IMakeDownloadDecision downloadDecisionMaker,
|
||||
|
||||
PostValidator.RuleFor(s => s.Title).NotEmpty();
|
||||
PostValidator.RuleFor(s => s.DownloadUrl).NotEmpty();
|
||||
PostValidator.RuleFor(s => s.DownloadProtocol).NotEmpty();
|
||||
PostValidator.RuleFor(s => s.Protocol).NotEmpty();
|
||||
PostValidator.RuleFor(s => s.PublishDate).NotEmpty();
|
||||
}
|
||||
|
||||
|
@ -5,7 +5,6 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using NzbDrone.Core.Indexers;
|
||||
|
||||
namespace NzbDrone.Integration.Test.ApiTests
|
||||
{
|
||||
@ -18,7 +17,8 @@ public void should_have_utc_date()
|
||||
var body = new Dictionary<string, object>();
|
||||
body.Add("guid", "sdfsdfsdf");
|
||||
body.Add("title", "The.Series.S01E01");
|
||||
body.Add("downloadProtocol", DownloadProtocol.Torrent.ToString());
|
||||
body.Add("downloadProtocol", 2);
|
||||
body.Add("downloadUrl", "https://sonarr.tv/test.torrent");
|
||||
body.Add("publishDate", DateTime.UtcNow.ToString("yyyy-MM-dd HH:mm:ssZ", CultureInfo.InvariantCulture));
|
||||
|
||||
var request = ReleasePush.BuildRequest();
|
||||
|
@ -33,7 +33,7 @@ public ReleasePushModule(IMakeDownloadDecision downloadDecisionMaker,
|
||||
|
||||
PostValidator.RuleFor(s => s.Title).NotEmpty();
|
||||
PostValidator.RuleFor(s => s.DownloadUrl).NotEmpty();
|
||||
PostValidator.RuleFor(s => s.DownloadProtocol).NotEmpty();
|
||||
PostValidator.RuleFor(s => s.Protocol).NotEmpty();
|
||||
PostValidator.RuleFor(s => s.PublishDate).NotEmpty();
|
||||
|
||||
Post["/push"] = x => ProcessRelease(ReadResourceFromRequest());
|
||||
|
Loading…
Reference in New Issue
Block a user