Appending .nzb to name when sent to nzbget

This commit is contained in:
Mark McDowall 2013-08-25 12:41:40 -07:00
parent b71518a803
commit a54689fbc4
2 changed files with 3 additions and 3 deletions

View File

@ -16,7 +16,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.NzbgetProviderTests
public class DownloadNzbFixture : CoreTest public class DownloadNzbFixture : CoreTest
{ {
private const string _url = "http://www.nzbdrone.com"; private const string _url = "http://www.nzbdrone.com";
private const string _title = "30 Rock - S01E01 - Pilot [HDTV-720p]"; private const string _title = "30.Rock.S01E01.Pilot.720p.hdtv";
private RemoteEpisode _remoteEpisode; private RemoteEpisode _remoteEpisode;
[SetUp] [SetUp]
@ -54,7 +54,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.NzbgetProviderTests
{ {
Mocker.GetMock<IHttpProvider>() Mocker.GetMock<IHttpProvider>()
.Setup(s => s.PostCommand("192.168.5.55:6789", "nzbget", "pass", .Setup(s => s.PostCommand("192.168.5.55:6789", "nzbget", "pass",
It.Is<String>(c => c.Equals("{\"method\":\"appendurl\",\"params\":[\"30 Rock - S01E01 - Pilot [HDTV-720p]\",\"TV\",50,false,\"http://www.nzbdrone.com\"]}")))) It.Is<String>(c => c.Equals("{\"method\":\"appendurl\",\"params\":[\"30.Rock.S01E01.Pilot.720p.hdtv.nzb\",\"TV\",50,false,\"http://www.nzbdrone.com\"]}"))))
.Returns("{\"version\": \"1.1\",\"result\": true}"); .Returns("{\"version\": \"1.1\",\"result\": true}");
Mocker.Resolve<NzbgetClient>().DownloadNzb(_remoteEpisode); Mocker.Resolve<NzbgetClient>().DownloadNzb(_remoteEpisode);

View File

@ -25,7 +25,7 @@ namespace NzbDrone.Core.Download.Clients.Nzbget
public void DownloadNzb(RemoteEpisode remoteEpisode) public void DownloadNzb(RemoteEpisode remoteEpisode)
{ {
var url = remoteEpisode.Report.NzbUrl; var url = remoteEpisode.Report.NzbUrl;
var title = remoteEpisode.Report.Title; var title = remoteEpisode.Report.Title + ".nzb";
string cat = _configService.NzbgetTvCategory; string cat = _configService.NzbgetTvCategory;
int priority = remoteEpisode.IsRecentEpisode() ? (int)_configService.NzbgetRecentTvPriority : (int)_configService.NzbgetOlderTvPriority; int priority = remoteEpisode.IsRecentEpisode() ? (int)_configService.NzbgetRecentTvPriority : (int)_configService.NzbgetOlderTvPriority;