1
0
Fork 0
mirror of https://github.com/Radarr/Radarr synced 2024-12-26 01:38:24 +00:00

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
{
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;
[SetUp]
@ -54,7 +54,7 @@ public void should_add_item_to_queue()
{
Mocker.GetMock<IHttpProvider>()
.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}");
Mocker.Resolve<NzbgetClient>().DownloadNzb(_remoteEpisode);

View file

@ -25,7 +25,7 @@ public NzbgetClient(IConfigService configService, IHttpProvider httpProvider, Lo
public void DownloadNzb(RemoteEpisode remoteEpisode)
{
var url = remoteEpisode.Report.NzbUrl;
var title = remoteEpisode.Report.Title;
var title = remoteEpisode.Report.Title + ".nzb";
string cat = _configService.NzbgetTvCategory;
int priority = remoteEpisode.IsRecentEpisode() ? (int)_configService.NzbgetRecentTvPriority : (int)_configService.NzbgetOlderTvPriority;