removed backlog from server

pull/4/head
Keivan Beigi 12 years ago committed by kay.one
parent 459c95d85e
commit 50ee2ee357

@ -36,7 +36,6 @@ namespace NzbDrone.Api.Series
//Editing Only //Editing Only
public Boolean SeasonFolder { get; set; } public Boolean SeasonFolder { get; set; }
public Boolean Monitored { get; set; } public Boolean Monitored { get; set; }
public BacklogSettingType BacklogSetting { get; set; }
public DateTime? CustomStartDate { get; set; } public DateTime? CustomStartDate { get; set; }
public Boolean UseSceneNumbering { get; set; } public Boolean UseSceneNumbering { get; set; }

@ -39,7 +39,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests
[Test] [Test]
public void DownloadNzb_should_download_file_if_it_doesnt_exist() public void DownloadNzb_should_download_file_if_it_doesnt_exist()
{ {
Subject.DownloadNzb(nzbUrl, title, false).Should().BeTrue(); Subject.DownloadNzb(nzbUrl, title).Should().BeTrue();
Mocker.GetMock<IHttpProvider>().Verify(c => c.DownloadFile(nzbUrl, nzbPath), Times.Once()); Mocker.GetMock<IHttpProvider>().Verify(c => c.DownloadFile(nzbUrl, nzbPath), Times.Once());
} }
@ -49,7 +49,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests
{ {
WithExistingFile(); WithExistingFile();
Subject.DownloadNzb(nzbUrl, title, false).Should().BeTrue(); Subject.DownloadNzb(nzbUrl, title).Should().BeTrue();
Mocker.GetMock<IHttpProvider>().Verify(c => c.DownloadFile(It.IsAny<string>(), It.IsAny<string>()), Times.Never()); Mocker.GetMock<IHttpProvider>().Verify(c => c.DownloadFile(It.IsAny<string>(), It.IsAny<string>()), Times.Never());
} }
@ -59,7 +59,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests
{ {
WithFailedDownload(); WithFailedDownload();
Subject.DownloadNzb(nzbUrl, title, false).Should().BeFalse(); Subject.DownloadNzb(nzbUrl, title).Should().BeFalse();
ExceptionVerification.ExpectedWarns(1); ExceptionVerification.ExpectedWarns(1);
} }
@ -70,7 +70,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests
var illegalTitle = "Saturday Night Live - S38E08 - Jeremy Renner/Maroon 5 [SDTV]"; var illegalTitle = "Saturday Night Live - S38E08 - Jeremy Renner/Maroon 5 [SDTV]";
var expectedFilename = Path.Combine(blackHoleFolder, "Saturday Night Live - S38E08 - Jeremy Renner+Maroon 5 [SDTV].nzb"); var expectedFilename = Path.Combine(blackHoleFolder, "Saturday Night Live - S38E08 - Jeremy Renner+Maroon 5 [SDTV].nzb");
Subject.DownloadNzb(nzbUrl, illegalTitle, false).Should().BeTrue(); Subject.DownloadNzb(nzbUrl, illegalTitle).Should().BeTrue();
Mocker.GetMock<IHttpProvider>().Verify(c => c.DownloadFile(It.IsAny<string>(), expectedFilename), Times.Once()); Mocker.GetMock<IHttpProvider>().Verify(c => c.DownloadFile(It.IsAny<string>(), expectedFilename), Times.Once());
} }

@ -20,7 +20,6 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.NzbgetProviderTests
fakeConfig.SetupGet(c => c.NzbgetUsername).Returns("nzbget"); fakeConfig.SetupGet(c => c.NzbgetUsername).Returns("nzbget");
fakeConfig.SetupGet(c => c.NzbgetPassword).Returns("pass"); fakeConfig.SetupGet(c => c.NzbgetPassword).Returns("pass");
fakeConfig.SetupGet(c => c.NzbgetTvCategory).Returns("TV"); fakeConfig.SetupGet(c => c.NzbgetTvCategory).Returns("TV");
fakeConfig.SetupGet(c => c.NzbgetBacklogTvPriority).Returns(PriorityType.Normal);
fakeConfig.SetupGet(c => c.NzbgetRecentTvPriority).Returns(PriorityType.High); fakeConfig.SetupGet(c => c.NzbgetRecentTvPriority).Returns(PriorityType.High);
} }
@ -44,7 +43,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.NzbgetProviderTests
.Returns("{\"version\": \"1.1\",\"result\": true}"); .Returns("{\"version\": \"1.1\",\"result\": true}");
Mocker.Resolve<NzbgetClient>() Mocker.Resolve<NzbgetClient>()
.DownloadNzb(url, title, false) .DownloadNzb(url, title)
.Should() .Should()
.BeTrue(); .BeTrue();
} }
@ -54,7 +53,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.NzbgetProviderTests
{ {
WithFailResponse(); WithFailResponse();
Assert.Throws<ApplicationException>(() => Mocker.Resolve<NzbgetClient>().DownloadNzb("http://www.nzbdrone.com", "30 Rock - S01E01 - Pilot [HDTV-720p]", false)); Assert.Throws<ApplicationException>(() => Mocker.Resolve<NzbgetClient>().DownloadNzb("http://www.nzbdrone.com", "30 Rock - S01E01 - Pilot [HDTV-720p]"));
} }
} }
} }

@ -20,7 +20,6 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.NzbgetProviderTests
fakeConfig.SetupGet(c => c.NzbgetUsername).Returns("nzbget"); fakeConfig.SetupGet(c => c.NzbgetUsername).Returns("nzbget");
fakeConfig.SetupGet(c => c.NzbgetPassword).Returns("pass"); fakeConfig.SetupGet(c => c.NzbgetPassword).Returns("pass");
fakeConfig.SetupGet(c => c.NzbgetTvCategory).Returns("TV"); fakeConfig.SetupGet(c => c.NzbgetTvCategory).Returns("TV");
fakeConfig.SetupGet(c => c.NzbgetBacklogTvPriority).Returns(PriorityType.Normal);
fakeConfig.SetupGet(c => c.NzbgetRecentTvPriority).Returns(PriorityType.High); fakeConfig.SetupGet(c => c.NzbgetRecentTvPriority).Returns(PriorityType.High);
} }

@ -42,7 +42,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests
[Test] [Test]
public void should_download_file_if_it_doesnt_exist() public void should_download_file_if_it_doesnt_exist()
{ {
Mocker.Resolve<PneumaticClient>().DownloadNzb(nzbUrl, title, false).Should().BeTrue(); Mocker.Resolve<PneumaticClient>().DownloadNzb(nzbUrl, title).Should().BeTrue();
Mocker.GetMock<IHttpProvider>().Verify(c => c.DownloadFile(nzbUrl, nzbPath),Times.Once()); Mocker.GetMock<IHttpProvider>().Verify(c => c.DownloadFile(nzbUrl, nzbPath),Times.Once());
} }
@ -52,7 +52,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests
{ {
WithExistingFile(); WithExistingFile();
Mocker.Resolve<PneumaticClient>().DownloadNzb(nzbUrl, title, false).Should().BeTrue(); Mocker.Resolve<PneumaticClient>().DownloadNzb(nzbUrl, title).Should().BeTrue();
Mocker.GetMock<IHttpProvider>().Verify(c => c.DownloadFile(It.IsAny<string>(), It.IsAny<string>()), Times.Never()); Mocker.GetMock<IHttpProvider>().Verify(c => c.DownloadFile(It.IsAny<string>(), It.IsAny<string>()), Times.Never());
} }
@ -62,7 +62,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests
{ {
WithFailedDownload(); WithFailedDownload();
Mocker.Resolve<PneumaticClient>().DownloadNzb(nzbUrl, title, false).Should().BeFalse(); Mocker.Resolve<PneumaticClient>().DownloadNzb(nzbUrl, title).Should().BeFalse();
ExceptionVerification.ExpectedWarns(1); ExceptionVerification.ExpectedWarns(1);
} }
@ -70,7 +70,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests
[Test] [Test]
public void should_skip_if_full_season_download() public void should_skip_if_full_season_download()
{ {
Mocker.Resolve<PneumaticClient>().DownloadNzb(nzbUrl, "30 Rock - Season 1", false).Should().BeFalse(); Mocker.Resolve<PneumaticClient>().DownloadNzb(nzbUrl, "30 Rock - Season 1").Should().BeFalse();
} }
[Test] [Test]
@ -79,7 +79,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests
var illegalTitle = "Saturday Night Live - S38E08 - Jeremy Renner/Maroon 5 [SDTV]"; var illegalTitle = "Saturday Night Live - S38E08 - Jeremy Renner/Maroon 5 [SDTV]";
var expectedFilename = Path.Combine(pneumaticFolder, "Saturday Night Live - S38E08 - Jeremy Renner+Maroon 5 [SDTV].nzb"); var expectedFilename = Path.Combine(pneumaticFolder, "Saturday Night Live - S38E08 - Jeremy Renner+Maroon 5 [SDTV].nzb");
Mocker.Resolve<PneumaticClient>().DownloadNzb(nzbUrl, illegalTitle, false).Should().BeTrue(); Mocker.Resolve<PneumaticClient>().DownloadNzb(nzbUrl, illegalTitle).Should().BeTrue();
Mocker.GetMock<IHttpProvider>().Verify(c => c.DownloadFile(It.IsAny<string>(), expectedFilename), Times.Once()); Mocker.GetMock<IHttpProvider>().Verify(c => c.DownloadFile(It.IsAny<string>(), expectedFilename), Times.Once());
} }

@ -45,14 +45,14 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.SabProviderTests
.Returns("{ \"status\": true }"); .Returns("{ \"status\": true }");
Subject.DownloadNzb(URL, TITLE, false).Should().BeTrue(); Subject.DownloadNzb(URL, TITLE).Should().BeTrue();
} }
[Test] [Test]
public void add_by_url_should_detect_and_handle_sab_errors() public void add_by_url_should_detect_and_handle_sab_errors()
{ {
WithFailResponse(); WithFailResponse();
Assert.Throws<ApplicationException>(() => Subject.DownloadNzb(URL, TITLE, false).Should().BeFalse()); Assert.Throws<ApplicationException>(() => Subject.DownloadNzb(URL, TITLE).Should().BeFalse());
} }
[Test] [Test]
@ -186,7 +186,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.SabProviderTests
Mocker.GetMock<IHttpProvider>() Mocker.GetMock<IHttpProvider>()
.Setup(s => s.DownloadString(It.IsAny<String>())).Throws(new WebException()); .Setup(s => s.DownloadString(It.IsAny<String>())).Throws(new WebException());
Subject.DownloadNzb(URL, TITLE, false).Should().BeFalse(); Subject.DownloadNzb(URL, TITLE).Should().BeFalse();
ExceptionVerification.ExpectedErrors(1); ExceptionVerification.ExpectedErrors(1);
} }
@ -197,41 +197,17 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.SabProviderTests
.SetupGet(s => s.SabRecentTvPriority) .SetupGet(s => s.SabRecentTvPriority)
.Returns(SabPriorityType.High); .Returns(SabPriorityType.High);
Mocker.GetMock<IConfigService>()
.SetupGet(s => s.SabBacklogTvPriority)
.Returns(SabPriorityType.Low);
Mocker.GetMock<IHttpProvider>() Mocker.GetMock<IHttpProvider>()
.Setup(s => s.DownloadString("http://192.168.5.55:2222/api?mode=addurl&name=http://www.nzbclub.com/nzb_download.aspx?mid=1950232&priority=1&pp=3&cat=tv&nzbname=My+Series+Name+-+5x2-5x3+-+My+title+%5bBluray720p%5d+%5bProper%5d&output=json&apikey=5c770e3197e4fe763423ee7c392c25d1&ma_username=admin&ma_password=pass")) .Setup(s => s.DownloadString("http://192.168.5.55:2222/api?mode=addurl&name=http://www.nzbclub.com/nzb_download.aspx?mid=1950232&priority=1&pp=3&cat=tv&nzbname=My+Series+Name+-+5x2-5x3+-+My+title+%5bBluray720p%5d+%5bProper%5d&output=json&apikey=5c770e3197e4fe763423ee7c392c25d1&ma_username=admin&ma_password=pass"))
.Returns("{ \"status\": true }"); .Returns("{ \"status\": true }");
Subject.DownloadNzb(URL, TITLE, true).Should().BeTrue(); Subject.DownloadNzb(URL, TITLE).Should().BeTrue();
Mocker.GetMock<IHttpProvider>() Mocker.GetMock<IHttpProvider>()
.Verify(v => v.DownloadString("http://192.168.5.55:2222/api?mode=addurl&name=http://www.nzbclub.com/nzb_download.aspx?mid=1950232&priority=1&pp=3&cat=tv&nzbname=My+Series+Name+-+5x2-5x3+-+My+title+%5bBluray720p%5d+%5bProper%5d&output=json&apikey=5c770e3197e4fe763423ee7c392c25d1&ma_username=admin&ma_password=pass"), Times.Once()); .Verify(v => v.DownloadString("http://192.168.5.55:2222/api?mode=addurl&name=http://www.nzbclub.com/nzb_download.aspx?mid=1950232&priority=1&pp=3&cat=tv&nzbname=My+Series+Name+-+5x2-5x3+-+My+title+%5bBluray720p%5d+%5bProper%5d&output=json&apikey=5c770e3197e4fe763423ee7c392c25d1&ma_username=admin&ma_password=pass"), Times.Once());
} }
[Test]
public void downloadNzb_should_use_sabBackogTvPriority_when_recentEpisode_is_false()
{
Mocker.GetMock<IConfigService>()
.SetupGet(s => s.SabRecentTvPriority)
.Returns(SabPriorityType.High);
Mocker.GetMock<IConfigService>()
.SetupGet(s => s.SabBacklogTvPriority)
.Returns(SabPriorityType.Low);
Mocker.GetMock<IHttpProvider>()
.Setup(s => s.DownloadString("http://192.168.5.55:2222/api?mode=addurl&name=http://www.nzbclub.com/nzb_download.aspx?mid=1950232&priority=-1&pp=3&cat=tv&nzbname=My+Series+Name+-+5x2-5x3+-+My+title+%5bBluray720p%5d+%5bProper%5d&output=json&apikey=5c770e3197e4fe763423ee7c392c25d1&ma_username=admin&ma_password=pass"))
.Returns("{ \"status\": true }");
Subject.DownloadNzb(URL, TITLE, false).Should().BeTrue();
Mocker.GetMock<IHttpProvider>()
.Verify(v => v.DownloadString("http://192.168.5.55:2222/api?mode=addurl&name=http://www.nzbclub.com/nzb_download.aspx?mid=1950232&priority=-1&pp=3&cat=tv&nzbname=My+Series+Name+-+5x2-5x3+-+My+title+%5bBluray720p%5d+%5bProper%5d&output=json&apikey=5c770e3197e4fe763423ee7c392c25d1&ma_username=admin&ma_password=pass"), Times.Once());
}
} }
} }

@ -37,14 +37,14 @@ namespace NzbDrone.Core.Test.Download
private void WithSuccessfulAdd() private void WithSuccessfulAdd()
{ {
Mocker.GetMock<IDownloadClient>() Mocker.GetMock<IDownloadClient>()
.Setup(s => s.DownloadNzb(It.IsAny<String>(), It.IsAny<String>(), It.IsAny<bool>())) .Setup(s => s.DownloadNzb(It.IsAny<String>(), It.IsAny<String>()))
.Returns(true); .Returns(true);
} }
private void WithFailedAdd() private void WithFailedAdd()
{ {
Mocker.GetMock<IDownloadClient>() Mocker.GetMock<IDownloadClient>()
.Setup(s => s.DownloadNzb(It.IsAny<String>(), It.IsAny<String>(), It.IsAny<bool>())) .Setup(s => s.DownloadNzb(It.IsAny<String>(), It.IsAny<String>()))
.Returns(false); .Returns(false);
} }
@ -66,7 +66,7 @@ namespace NzbDrone.Core.Test.Download
Subject.DownloadReport(_parseResult); Subject.DownloadReport(_parseResult);
Mocker.GetMock<IDownloadClient>() Mocker.GetMock<IDownloadClient>()
.Verify(s => s.DownloadNzb(It.IsAny<String>(), It.IsAny<String>(), true), Times.Once()); .Verify(s => s.DownloadNzb(It.IsAny<String>(), It.IsAny<String>()), Times.Once());
} }
[Test] [Test]

@ -102,13 +102,6 @@ namespace NzbDrone.Core.Configuration
set { SetValue("SabTvCategory", value); } set { SetValue("SabTvCategory", value); }
} }
public SabPriorityType SabBacklogTvPriority
{
get { return GetValueEnum("SabBacklogTvPriority", SabPriorityType.Default); }
set { SetValue("SabBacklogTvPriority", value); }
}
public SabPriorityType SabRecentTvPriority public SabPriorityType SabRecentTvPriority
{ {
get { return GetValueEnum("SabRecentTvPriority", SabPriorityType.Default); } get { return GetValueEnum("SabRecentTvPriority", SabPriorityType.Default); }
@ -142,12 +135,6 @@ namespace NzbDrone.Core.Configuration
set { SetValue("UpdateUrl", value); } set { SetValue("UpdateUrl", value); }
} }
public bool EnableBacklogSearching
{
get { return GetValueBoolean("EnableBacklogSearching"); }
set { SetValue("EnableBacklogSearching", value); }
}
public bool AutoIgnorePreviouslyDownloadedEpisodes public bool AutoIgnorePreviouslyDownloadedEpisodes
{ {
get { return GetValueBoolean("AutoIgnorePreviouslyDownloadedEpisodes"); } get { return GetValueBoolean("AutoIgnorePreviouslyDownloadedEpisodes"); }
@ -257,13 +244,6 @@ namespace NzbDrone.Core.Configuration
set { SetValue("NzbgetPriority", value); } set { SetValue("NzbgetPriority", value); }
} }
public PriorityType NzbgetBacklogTvPriority
{
get { return GetValueEnum("NzbgetBacklogTvPriority", PriorityType.Normal); }
set { SetValue("NzbgetBacklogTvPriority", value); }
}
public PriorityType NzbgetRecentTvPriority public PriorityType NzbgetRecentTvPriority
{ {
get { return GetValueEnum("NzbgetRecentTvPriority", PriorityType.Normal); } get { return GetValueEnum("NzbgetRecentTvPriority", PriorityType.Normal); }

@ -17,7 +17,6 @@ namespace NzbDrone.Core.Configuration
String SabUsername { get; set; } String SabUsername { get; set; }
String SabPassword { get; set; } String SabPassword { get; set; }
String SabTvCategory { get; set; } String SabTvCategory { get; set; }
SabPriorityType SabBacklogTvPriority { get; set; }
SabPriorityType SabRecentTvPriority { get; set; } SabPriorityType SabRecentTvPriority { get; set; }
String DownloadedEpisodesFolder { get; set; } String DownloadedEpisodesFolder { get; set; }
bool UseSeasonFolder { get; set; } bool UseSeasonFolder { get; set; }
@ -40,7 +39,6 @@ namespace NzbDrone.Core.Configuration
Int32 NzbgetPort { get; set; } Int32 NzbgetPort { get; set; }
String NzbgetTvCategory { get; set; } String NzbgetTvCategory { get; set; }
Int32 NzbgetPriority { get; set; } Int32 NzbgetPriority { get; set; }
PriorityType NzbgetBacklogTvPriority { get; set; }
PriorityType NzbgetRecentTvPriority { get; set; } PriorityType NzbgetRecentTvPriority { get; set; }
string NzbRestrictions { get; set; } string NzbRestrictions { get; set; }
string GetValue(string key, object defaultValue, bool persist = false); string GetValue(string key, object defaultValue, bool persist = false);

@ -4,9 +4,7 @@ using System.IO;
using NLog; using NLog;
using NzbDrone.Common; using NzbDrone.Common;
using NzbDrone.Core.Configuration; using NzbDrone.Core.Configuration;
using NzbDrone.Core.Model;
using NzbDrone.Core.Organizer; using NzbDrone.Core.Organizer;
using NzbDrone.Core.Parser;
using NzbDrone.Core.Parser.Model; using NzbDrone.Core.Parser.Model;
namespace NzbDrone.Core.Download.Clients namespace NzbDrone.Core.Download.Clients
@ -34,7 +32,7 @@ namespace NzbDrone.Core.Download.Clients
throw new NotImplementedException(); throw new NotImplementedException();
} }
public bool DownloadNzb(string url, string title, bool recentlyAired) public bool DownloadNzb(string url, string title)
{ {
try try
{ {

@ -21,12 +21,12 @@ namespace NzbDrone.Core.Download.Clients.Nzbget
_logger = logger; _logger = logger;
} }
public virtual bool DownloadNzb(string url, string title, bool recentlyAired) public virtual bool DownloadNzb(string url, string title)
{ {
try try
{ {
string cat = _configService.NzbgetTvCategory; string cat = _configService.NzbgetTvCategory;
int priority = recentlyAired ? (int)_configService.NzbgetRecentTvPriority : (int)_configService.NzbgetBacklogTvPriority; int priority = (int)_configService.NzbgetRecentTvPriority;
var command = new JsonRequest var command = new JsonRequest
{ {

@ -1,16 +1,10 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq;
using NLog; using NLog;
using NzbDrone.Common; using NzbDrone.Common;
using NzbDrone.Core.Configuration; using NzbDrone.Core.Configuration;
using NzbDrone.Core.DecisionEngine.Specifications;
using NzbDrone.Core.MediaFiles;
using NzbDrone.Core.Model;
using NzbDrone.Core.DecisionEngine;
using NzbDrone.Core.Organizer; using NzbDrone.Core.Organizer;
using NzbDrone.Core.Parser;
using NzbDrone.Core.Parser.Model; using NzbDrone.Core.Parser.Model;
namespace NzbDrone.Core.Download.Clients namespace NzbDrone.Core.Download.Clients
@ -31,7 +25,7 @@ namespace NzbDrone.Core.Download.Clients
_diskProvider = diskProvider; _diskProvider = diskProvider;
} }
public virtual bool DownloadNzb(string url, string title, bool recentlyAired) public virtual bool DownloadNzb(string url, string title)
{ {
try try
{ {

@ -24,7 +24,7 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd
public IRestRequest AddToQueueRequest(RemoteEpisode remoteEpisode) public IRestRequest AddToQueueRequest(RemoteEpisode remoteEpisode)
{ {
string cat = _configService.SabTvCategory; string cat = _configService.SabTvCategory;
int priority = remoteEpisode.IsRecentEpisode() ? (int)_configService.SabRecentTvPriority : (int)_configService.SabBacklogTvPriority; int priority = (int)_configService.SabRecentTvPriority;
string name = remoteEpisode.Report.NzbUrl.Replace("&", "%26"); string name = remoteEpisode.Report.NzbUrl.Replace("&", "%26");
string nzbName = HttpUtility.UrlEncode(remoteEpisode.Report.Title); string nzbName = HttpUtility.UrlEncode(remoteEpisode.Report.Title);
@ -64,12 +64,12 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd
_logger = logger; _logger = logger;
} }
public virtual bool DownloadNzb(string url, string title, bool recentlyAired) public virtual bool DownloadNzb(string url, string title)
{ {
try try
{ {
string cat = _configService.SabTvCategory; string cat = _configService.SabTvCategory;
int priority = recentlyAired ? (int)_configService.SabRecentTvPriority : (int)_configService.SabBacklogTvPriority; int priority =(int)_configService.SabRecentTvPriority ;
string name = url.Replace("&", "%26"); string name = url.Replace("&", "%26");
string nzbName = HttpUtility.UrlEncode(title); string nzbName = HttpUtility.UrlEncode(title);

@ -30,7 +30,7 @@ namespace NzbDrone.Core.Download
var provider = _downloadClientProvider.GetDownloadClient(); var provider = _downloadClientProvider.GetDownloadClient();
bool success = provider.DownloadNzb(remoteEpisode.Report.NzbUrl, downloadTitle, remoteEpisode.IsRecentEpisode()); bool success = provider.DownloadNzb(remoteEpisode.Report.NzbUrl, downloadTitle);
if (success) if (success)
{ {

@ -6,7 +6,7 @@ namespace NzbDrone.Core.Download
{ {
public interface IDownloadClient public interface IDownloadClient
{ {
bool DownloadNzb(string url, string title, bool recentlyAired); bool DownloadNzb(string url, string title);
IEnumerable<QueueItem> GetQueue(); IEnumerable<QueueItem> GetQueue();
} }

@ -1,9 +0,0 @@
namespace NzbDrone.Core.Model
{
public enum BacklogSettingType
{
Inherit = 0,
Enable = 1,
Disable = 2
}
}

@ -350,7 +350,6 @@
<Compile Include="Instrumentation\LogService.cs" /> <Compile Include="Instrumentation\LogService.cs" />
<Compile Include="Instrumentation\DatabaseTarget.cs" /> <Compile Include="Instrumentation\DatabaseTarget.cs" />
<Compile Include="Model\AtomicParsleyTitleType.cs" /> <Compile Include="Model\AtomicParsleyTitleType.cs" />
<Compile Include="Model\BacklogSettingType.cs" />
<Compile Include="Model\MediaInfoModel.cs" /> <Compile Include="Model\MediaInfoModel.cs" />
<Compile Include="Download\Clients\Nzbget\EnqueueResponse.cs" /> <Compile Include="Download\Clients\Nzbget\EnqueueResponse.cs" />
<Compile Include="Download\Clients\Nzbget\ErrorModel.cs" /> <Compile Include="Download\Clients\Nzbget\ErrorModel.cs" />

@ -1,6 +1,4 @@
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using NzbDrone.Core.Tv; using NzbDrone.Core.Tv;
namespace NzbDrone.Core.Parser.Model namespace NzbDrone.Core.Parser.Model
@ -14,10 +12,5 @@ namespace NzbDrone.Core.Parser.Model
public Series Series { get; set; } public Series Series { get; set; }
public List<Episode> Episodes { get; set; } public List<Episode> Episodes { get; set; }
public bool IsRecentEpisode()
{
return Episodes.Any(e => e.AirDate >= DateTime.Today.AddDays(-7));
}
} }
} }

@ -2,9 +2,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using Marr.Data; using Marr.Data;
using NzbDrone.Core.Datastore; using NzbDrone.Core.Datastore;
using NzbDrone.Core.Model;
using NzbDrone.Core.Qualities; using NzbDrone.Core.Qualities;
using NzbDrone.Core.RootFolders;
namespace NzbDrone.Core.Tv namespace NzbDrone.Core.Tv
@ -31,7 +29,6 @@ namespace NzbDrone.Core.Tv
public int Runtime { get; set; } public int Runtime { get; set; }
public List<MediaCover.MediaCover> Images { get; set; } public List<MediaCover.MediaCover> Images { get; set; }
public SeriesTypes SeriesType { get; set; } public SeriesTypes SeriesType { get; set; }
public BacklogSettingType BacklogSetting { get; set; }
public string Network { get; set; } public string Network { get; set; }
public DateTime? CustomStartDate { get; set; } public DateTime? CustomStartDate { get; set; }
public bool UseSceneNumbering { get; set; } public bool UseSceneNumbering { get; set; }

@ -80,7 +80,6 @@ namespace NzbDrone.Core.Tv
newSeries.CleanTitle = Parser.Parser.CleanSeriesTitle(newSeries.Title); newSeries.CleanTitle = Parser.Parser.CleanSeriesTitle(newSeries.Title);
newSeries.SeasonFolder = _configService.UseSeasonFolder; newSeries.SeasonFolder = _configService.UseSeasonFolder;
newSeries.BacklogSetting = BacklogSettingType.Inherit;
_seriesRepository.Insert(newSeries); _seriesRepository.Insert(newSeries);
_messageAggregator.PublishEvent(new SeriesAddedEvent(newSeries)); _messageAggregator.PublishEvent(new SeriesAddedEvent(newSeries));
@ -99,7 +98,6 @@ namespace NzbDrone.Core.Tv
series.QualityProfileId = edited.QualityProfileId; series.QualityProfileId = edited.QualityProfileId;
series.Monitored = edited.Monitored; series.Monitored = edited.Monitored;
series.SeasonFolder = edited.SeasonFolder; series.SeasonFolder = edited.SeasonFolder;
series.BacklogSetting = edited.BacklogSetting;
//series.Path = edited.Path; //series.Path = edited.Path;
series.CustomStartDate = edited.CustomStartDate; series.CustomStartDate = edited.CustomStartDate;

Loading…
Cancel
Save