skip queue check and adding new items if download client isn't configured correctly.

This commit is contained in:
kay.one
2013-07-30 22:49:41 -07:00
parent 1eb278c7f6
commit a5bb99367e
8 changed files with 73 additions and 5 deletions
@@ -63,6 +63,14 @@ namespace NzbDrone.Core.Download.Clients
}
}
public bool IsConfigured
{
get
{
return !string.IsNullOrWhiteSpace(_configService.BlackholeFolder);
}
}
public IEnumerable<QueueItem> GetQueue()
{
return new QueueItem[0];
@@ -57,6 +57,14 @@ namespace NzbDrone.Core.Download.Clients.Nzbget
return false;
}
public bool IsConfigured
{
get
{
return !string.IsNullOrWhiteSpace(_configService.NzbgetHost) && _configService.NzbgetPort != 0;
}
}
public virtual IEnumerable<QueueItem> GetQueue()
{
var command = new JsonRequest
@@ -68,6 +68,14 @@ namespace NzbDrone.Core.Download.Clients
}
}
public bool IsConfigured
{
get
{
return !string.IsNullOrWhiteSpace(_configService.PneumaticFolder);
}
}
public IEnumerable<QueueItem> GetQueue()
{
return new QueueItem[0];
@@ -24,7 +24,7 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd
public IRestRequest AddToQueueRequest(RemoteEpisode remoteEpisode)
{
string cat = _configService.SabTvCategory;
int priority = (int)_configService.SabRecentTvPriority;
int priority = (int)_configService.SabRecentTvPriority;
string name = remoteEpisode.Report.NzbUrl.Replace("&", "%26");
string nzbName = HttpUtility.UrlEncode(remoteEpisode.Report.Title);
@@ -97,6 +97,15 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd
return false;
}
public bool IsConfigured
{
get
{
return !string.IsNullOrWhiteSpace(_configService.SabHost)
&& _configService.SabPort != 0;
}
}
public IEnumerable<QueueItem> GetQueue()
{
string action = String.Format("mode=queue&output=json&start={0}&limit={1}", 0, 0);