mirror of
https://github.com/Sonarr/Sonarr.git
synced 2026-04-16 21:15:28 -04:00
37 lines
1.0 KiB
JavaScript
37 lines
1.0 KiB
JavaScript
'use strict';
|
|
define(
|
|
[
|
|
'Cells/NzbDroneCell'
|
|
], function (NzbDroneCell) {
|
|
return NzbDroneCell.extend({
|
|
|
|
className: 'history-quality-cell',
|
|
|
|
render: function () {
|
|
|
|
var title = '';
|
|
var quality = this.model.get('quality');
|
|
var revision = quality.revision;
|
|
|
|
if (revision.real && revision.real > 0) {
|
|
title += ' REAL';
|
|
}
|
|
|
|
if (revision.version && revision.version > 1) {
|
|
title += ' PROPER';
|
|
}
|
|
|
|
title = title.trim();
|
|
|
|
if (this.model.get('qualityCutoffNotMet')) {
|
|
this.$el.html('<span class="badge badge-inverse" title="{0}">{1}</span>'.format(title, quality.quality.name));
|
|
}
|
|
else {
|
|
this.$el.html('<span class="badge" title="{0}">{1}</span>'.format(title, quality.quality.name));
|
|
}
|
|
|
|
return this;
|
|
}
|
|
});
|
|
});
|