mirror of https://github.com/lidarr/Lidarr
Nzbx download URL fixed
Fixed: Nzbx download URL formatted correctly
This commit is contained in:
parent
7d82c249f9
commit
e17ed8c0ad
|
@ -115,5 +115,19 @@ namespace NzbDrone.Core.Test.IndexerTests
|
|||
parseResults.Should().HaveCount(1);
|
||||
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 @@ namespace NzbDrone.Core.Providers.Indexer
|
|||
episodeParseResult.Age = DateTime.Now.Date.Subtract(item.PostDate).Days;
|
||||
episodeParseResult.OriginalString = item.Name;
|
||||
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.Size = item.Size;
|
||||
|
||||
|
@ -178,6 +179,7 @@ namespace NzbDrone.Core.Providers.Indexer
|
|||
episodeParseResult.OriginalString = item.Name;
|
||||
episodeParseResult.SceneSource = true;
|
||||
episodeParseResult.NzbUrl = item.Nzb;
|
||||
episodeParseResult.NzbInfoUrl = String.Format("http://nzbx.co/d?{0}", item.Guid);
|
||||
episodeParseResult.Indexer = Name;
|
||||
episodeParseResult.Size = item.Size;
|
||||
|
||||
|
|
Loading…
Reference in New Issue