mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-18 21:34:28 -04:00
Queue should update now
This commit is contained in:
@@ -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',
|
||||
|
||||
39
src/UI/History/Queue/QueueStatusCell.js
Normal file
39
src/UI/History/Queue/QueueStatusCell.js
Normal file
@@ -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;
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user