mirror of
https://github.com/fergalmoran/Readarr.git
synced 2025-12-31 05:48:18 +00:00
Fixed: ReleasePush Validation should use Protocol
This commit is contained in:
@@ -35,7 +35,7 @@ namespace Lidarr.Api.V1.Indexers
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
|
||||
@@ -51,9 +51,6 @@ namespace Lidarr.Api.V1.Indexers
|
||||
public int? Leechers { get; set; }
|
||||
public DownloadProtocol Protocol { get; set; }
|
||||
|
||||
//TODO: besides a test I don't think this is used...
|
||||
public DownloadProtocol DownloadProtocol { get; set; }
|
||||
|
||||
// Sent when queuing an unknown release
|
||||
|
||||
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
@@ -142,7 +139,7 @@ namespace Lidarr.Api.V1.Indexers
|
||||
model.CommentUrl = resource.CommentUrl;
|
||||
model.IndexerId = resource.IndexerId;
|
||||
model.Indexer = resource.Indexer;
|
||||
model.DownloadProtocol = resource.DownloadProtocol;
|
||||
model.DownloadProtocol = resource.Protocol;
|
||||
model.PublishDate = resource.PublishDate.ToUniversalTime();
|
||||
|
||||
return model;
|
||||
|
||||
@@ -15,8 +15,9 @@ namespace NzbDrone.Integration.Test.ApiTests
|
||||
public void should_have_utc_date()
|
||||
{
|
||||
var body = new Dictionary<string, object>();
|
||||
body.Add("guid", "sdfsdfsdf");
|
||||
body.Add("title", "The Artist - The Album (2008) [FLAC]");
|
||||
body.Add("protocol", "Torrent");
|
||||
body.Add("downloadUrl", "https://lidarr.audio/test.torrent");
|
||||
body.Add("publishDate", DateTime.UtcNow.ToString("yyyy-MM-dd HH:mm:ssZ", CultureInfo.InvariantCulture));
|
||||
|
||||
var request = ReleasePush.BuildRequest();
|
||||
|
||||
Reference in New Issue
Block a user