Queue should update now

pull/4/head
Mark McDowall 11 years ago
parent 938b5f1ae3
commit 6f27d8c33f

@ -14,5 +14,6 @@ namespace NzbDrone.Api.Queue
public String Title { get; set; }
public Decimal Sizeleft { get; set; }
public TimeSpan Timeleft { get; set; }
public String Status { get; set; }
}
}

@ -73,7 +73,7 @@ namespace NzbDrone.Core.Download.Clients.Nzbget
queueItem.Id = nzbGetQueueItem.NzbId.ToString();
queueItem.Title = nzbGetQueueItem.NzbName;
queueItem.Size = nzbGetQueueItem.FileSizeMb;
queueItem.SizeLeft = nzbGetQueueItem.RemainingSizeMb;
queueItem.Sizeleft = nzbGetQueueItem.RemainingSizeMb;
yield return queueItem;
}

@ -27,7 +27,7 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd
public string Category { get; set; }
[JsonProperty(PropertyName = "mbleft")]
public decimal SizeLeft { get; set; }
public decimal Sizeleft { get; set; }
public int Percentage { get; set; }

@ -117,7 +117,9 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd
queueItem.Id = sabQueueItem.Id;
queueItem.Title = sabQueueItem.Title;
queueItem.Size = sabQueueItem.Size;
queueItem.SizeLeft = sabQueueItem.Size;
queueItem.Sizeleft = sabQueueItem.Sizeleft;
queueItem.Timeleft = sabQueueItem.Timeleft;
queueItem.Status = sabQueueItem.Status;
queueItems.Add(queueItem);
}

@ -7,7 +7,8 @@ namespace NzbDrone.Core.Download
public string Id { get; set; }
public decimal Size { get; set; }
public string Title { get; set; }
public decimal SizeLeft { get; set; }
public decimal Sizeleft { get; set; }
public TimeSpan Timeleft { get; set; }
public String Status { get; set; }
}
}

@ -13,5 +13,6 @@ namespace NzbDrone.Core.Queue
public String Title { get; set; }
public Decimal Sizeleft { get; set; }
public TimeSpan Timeleft { get; set; }
public String Status { get; set; }
}
}

@ -59,8 +59,9 @@ namespace NzbDrone.Core.Queue
queue.Quality = remoteEpisode.ParsedEpisodeInfo.Quality;
queue.Title = queueItem.Title;
queue.Size = queueItem.Size;
queue.Sizeleft = queueItem.SizeLeft;
queue.Sizeleft = queueItem.Sizeleft;
queue.Timeleft = queueItem.Timeleft;
queue.Status = queueItem.Status;
queued.Add(queue);
}
}

@ -97,3 +97,8 @@ td.episode-status-cell, td.quality-cell {
cursor: default;
width: 80px;
}
.queue-status-cell {
width: 20px;
text-align: center !important;
}

@ -8,6 +8,7 @@ define(
'Cells/EpisodeNumberCell',
'Cells/EpisodeTitleCell',
'Cells/QualityCell',
'History/Queue/QueueStatusCell',
'History/Queue/TimeleftCell'
], function (Marionette,
Backgrid,
@ -16,6 +17,7 @@ define(
EpisodeNumberCell,
EpisodeTitleCell,
QualityCell,
QueueStatusCell,
TimeleftCell) {
return Marionette.Layout.extend({
template: 'History/Queue/QueueLayoutTemplate',
@ -26,6 +28,12 @@ define(
columns:
[
{
name : 'status',
label: '',
cell : QueueStatusCell,
cellValue: 'this'
},
{
name : 'series',
label: 'Series',

@ -0,0 +1,39 @@
'use strict';
define(
[
'Cells/NzbDroneCell'
], function (NzbDroneCell) {
return NzbDroneCell.extend({
className: 'queue-status-cell',
render: function () {
this.$el.empty();
if (this.cellValue) {
var status = this.cellValue.get('status').toLowerCase();
var icon = 'icon-nd-downloading';
var title = 'Downloading';
if (status === 'paused') {
icon = 'icon-pause';
title = 'Paused';
}
if (status === 'queued') {
icon = 'icon-cloud';
title = 'Queued';
}
var timeleft = this.cellValue.get('timeleft');
var size = this.cellValue.get('size');
var sizeleft = this.cellValue.get('sizeleft');
this.$el.html('<i class="{0}" title="{1}"></i>'.format(icon, title));
}
return this;
}
});
});

@ -22,7 +22,7 @@ define(function () {
}
if (xhr) {
xhr.headers = xhr.headers || {};
xhr.headers['Authorization'] = window.NzbDrone.ApiKey;
// xhr.headers.Authorization = window.NzbDrone.ApiKey;
}
return original.apply(this, arguments);

Loading…
Cancel
Save