Nzbx download URL fixed

Fixed: Nzbx download URL formatted correctly
pull/4/head
Mark McDowall 12 years ago
parent 7d82c249f9
commit e17ed8c0ad

@ -115,5 +115,19 @@ namespace NzbDrone.Core.Test.IndexerTests
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 @@ namespace NzbDrone.Core.Providers.Indexer
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 @@ namespace NzbDrone.Core.Providers.Indexer
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…
Cancel
Save