Fixed a copy pasta error for SAB history

This commit is contained in:
Mark McDowall 2014-02-17 17:57:20 -08:00
parent 6b389d2643
commit f9312eb3e5
8 changed files with 9 additions and 11 deletions

View File

@ -45,7 +45,7 @@ namespace NzbDrone.Core.Download.Clients.Blackhole
return new QueueItem[0]; return new QueueItem[0];
} }
public override IEnumerable<HistoryItem> GetHistory(int start = 0, int limit = 0) public override IEnumerable<HistoryItem> GetHistory(int start = 0, int limit = 10)
{ {
return new HistoryItem[0]; return new HistoryItem[0];
} }

View File

@ -65,7 +65,7 @@ namespace NzbDrone.Core.Download.Clients.Nzbget
} }
} }
public override IEnumerable<HistoryItem> GetHistory(int start = 0, int limit = 0) public override IEnumerable<HistoryItem> GetHistory(int start = 0, int limit = 10)
{ {
return new HistoryItem[0]; return new HistoryItem[0];
} }

View File

@ -67,7 +67,7 @@ namespace NzbDrone.Core.Download.Clients.Pneumatic
return new QueueItem[0]; return new QueueItem[0];
} }
public override IEnumerable<HistoryItem> GetHistory(int start = 0, int limit = 0) public override IEnumerable<HistoryItem> GetHistory(int start = 0, int limit = 10)
{ {
return new HistoryItem[0]; return new HistoryItem[0];
} }

View File

@ -89,7 +89,7 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd
}, TimeSpan.FromSeconds(10)); }, TimeSpan.FromSeconds(10));
} }
public override IEnumerable<HistoryItem> GetHistory(int start = 0, int limit = 0) public override IEnumerable<HistoryItem> GetHistory(int start = 0, int limit = 10)
{ {
var items = _sabnzbdProxy.GetHistory(start, limit, Settings).Items; var items = _sabnzbdProxy.GetHistory(start, limit, Settings).Items;
var historyItems = new List<HistoryItem>(); var historyItems = new List<HistoryItem>();

View File

@ -108,7 +108,7 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd
public SabnzbdHistory GetHistory(int start, int limit, SabnzbdSettings settings) public SabnzbdHistory GetHistory(int start, int limit, SabnzbdSettings settings)
{ {
var request = new RestRequest(); var request = new RestRequest();
var action = String.Format("mode=queue&start={0}&limit={1}", start, limit); var action = String.Format("mode=history&start={0}&limit={1}", start, limit);
var response = ProcessRequest(request, action, settings); var response = ProcessRequest(request, action, settings);
return Json.Deserialize<SabnzbdHistory>(JObject.Parse(response).SelectToken("history").ToString()); return Json.Deserialize<SabnzbdHistory>(JObject.Parse(response).SelectToken("history").ToString());

View File

@ -41,7 +41,7 @@ namespace NzbDrone.Core.Download
public abstract string DownloadNzb(RemoteEpisode remoteEpisode); public abstract string DownloadNzb(RemoteEpisode remoteEpisode);
public abstract IEnumerable<QueueItem> GetQueue(); public abstract IEnumerable<QueueItem> GetQueue();
public abstract IEnumerable<HistoryItem> GetHistory(int start = 0, int limit = 0); public abstract IEnumerable<HistoryItem> GetHistory(int start = 0, int limit = 10);
public abstract void RemoveFromQueue(string id); public abstract void RemoveFromQueue(string id);
public abstract void RemoveFromHistory(string id); public abstract void RemoveFromHistory(string id);
} }

View File

@ -8,16 +8,16 @@
<option es3="false" /> <option es3="false" />
<option forin="true" /> <option forin="true" />
<option immed="true" /> <option immed="true" />
<option latedef="true" />
<option newcap="true" /> <option newcap="true" />
<option noarg="true" /> <option noarg="true" />
<option noempty="false" /> <option noempty="false" />
<option nonew="true" /> <option nonew="true" />
<option plusplus="false" /> <option plusplus="false" />
<option undef="true" /> <option undef="true" />
<option unused="true" />
<option strict="true" /> <option strict="true" />
<option trailing="false" /> <option trailing="false" />
<option latedef="true" />
<option unused="true" />
<option quotmark="single" /> <option quotmark="single" />
<option maxdepth="3" /> <option maxdepth="3" />
<option asi="false" /> <option asi="false" />

View File

@ -26,9 +26,7 @@ define([
this.model.set({ this.model.set({
id : undefined, id : undefined,
name : this.model.get('implementationName'), name : this.model.get('implementationName'),
onGrab : true, enable : true
onDownload : true,
onUpgrade : true
}); });
var editView = new EditView({ model: this.model, downloadClientCollection: this.downloadClientCollection }); var editView = new EditView({ model: this.model, downloadClientCollection: this.downloadClientCollection });