mirror of
https://github.com/Radarr/Radarr
synced 2024-12-26 01:38:24 +00:00
Nzbx download URL fixed
Fixed: Nzbx download URL formatted correctly
This commit is contained in:
parent
7d82c249f9
commit
e17ed8c0ad
2 changed files with 17 additions and 1 deletions
|
@ -115,5 +115,19 @@ public void should_get_postedDate_when_parsing_search_results()
|
||||||
parseResults.Should().HaveCount(1);
|
parseResults.Should().HaveCount(1);
|
||||||
parseResults[0].Age.Should().Be(expectedAge);
|
parseResults[0].Age.Should().Be(expectedAge);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void should_name_nzb_properly()
|
||||||
|
{
|
||||||
|
Mocker.GetMock<HttpProvider>()
|
||||||
|
.Setup(h => h.DownloadString("https://nzbx.co/api/recent?category=tv", It.IsAny<NetworkCredential>()))
|
||||||
|
.Returns(File.ReadAllText(".\\Files\\Rss\\SizeParsing\\nzbx_recent.json"));
|
||||||
|
|
||||||
|
//Act
|
||||||
|
var parseResults = Mocker.Resolve<Nzbx>().FetchRss();
|
||||||
|
|
||||||
|
parseResults.Should().HaveCount(1);
|
||||||
|
parseResults[0].NzbUrl.Should().EndWith(parseResults[0].OriginalString);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -127,7 +127,8 @@ public override IList<EpisodeParseResult> FetchRss()
|
||||||
episodeParseResult.Age = DateTime.Now.Date.Subtract(item.PostDate).Days;
|
episodeParseResult.Age = DateTime.Now.Date.Subtract(item.PostDate).Days;
|
||||||
episodeParseResult.OriginalString = item.Name;
|
episodeParseResult.OriginalString = item.Name;
|
||||||
episodeParseResult.SceneSource = true;
|
episodeParseResult.SceneSource = true;
|
||||||
episodeParseResult.NzbUrl = String.Format("http://nzbx.co/nzb?{0}", item.Guid);
|
episodeParseResult.NzbUrl = String.Format("http://nzbx.co/nzb?{0}*|*{1}", item.Guid, item.Name);
|
||||||
|
episodeParseResult.NzbInfoUrl = String.Format("http://nzbx.co/d?{0}", item.Guid);
|
||||||
episodeParseResult.Indexer = Name;
|
episodeParseResult.Indexer = Name;
|
||||||
episodeParseResult.Size = item.Size;
|
episodeParseResult.Size = item.Size;
|
||||||
|
|
||||||
|
@ -178,6 +179,7 @@ protected override List<EpisodeParseResult> Fetch(IEnumerable<string> urls)
|
||||||
episodeParseResult.OriginalString = item.Name;
|
episodeParseResult.OriginalString = item.Name;
|
||||||
episodeParseResult.SceneSource = true;
|
episodeParseResult.SceneSource = true;
|
||||||
episodeParseResult.NzbUrl = item.Nzb;
|
episodeParseResult.NzbUrl = item.Nzb;
|
||||||
|
episodeParseResult.NzbInfoUrl = String.Format("http://nzbx.co/d?{0}", item.Guid);
|
||||||
episodeParseResult.Indexer = Name;
|
episodeParseResult.Indexer = Name;
|
||||||
episodeParseResult.Size = item.Size;
|
episodeParseResult.Size = item.Size;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue