Blacklisting torrents and using more info to evaluate matches

New: Blacklisting torrents manually
New: Details on why a release was blacklisted in the UI
New: Blacklist matching take into account indexer, size, date and name
This commit is contained in:
Mark McDowall
2015-04-19 20:25:59 -07:00
parent 14f49489a7
commit bc03ad2a18
17 changed files with 311 additions and 99 deletions
@@ -1,19 +1,27 @@
var vent = require('vent');
var NzbDroneCell = require('../../Cells/NzbDroneCell');
var BlacklistDetailsLayout = require('./Details/BlacklistDetailsLayout');
module.exports = NzbDroneCell.extend({
className : 'blacklist-controls-cell',
className : 'blacklist-actions-cell',
events : {
'click' : '_delete'
'click .x-details' : '_details',
'click .x-delete' : '_delete'
},
render : function() {
this.$el.empty();
this.$el.html('<i class="icon-sonarr-delete"></i>');
this.$el.html('<i class="icon-sonarr-info x-details"></i>' +
'<i class="icon-sonarr-delete x-delete"></i>');
return this;
},
_details : function() {
vent.trigger(vent.Commands.OpenModalCommand, new BlacklistDetailsLayout({ model : this.model }));
},
_delete : function() {
this.model.destroy();
}
@@ -0,0 +1,14 @@
var Marionette = require('marionette');
var BlacklistDetailsView = require('./BlacklistDetailsView');
module.exports = Marionette.Layout.extend({
template : 'Activity/Blacklist/Details/BlacklistDetailsLayoutTemplate',
regions : {
bodyRegion : '.modal-body'
},
onShow : function() {
this.bodyRegion.show(new BlacklistDetailsView({ model : this.model }));
}
});
@@ -0,0 +1,18 @@
<div class="modal-content">
<div class="history-detail-modal">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h3>
Blacklisted
</h3>
</div>
<div class="modal-body">
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal">close</button>
</div>
</div>
</div>
@@ -0,0 +1,5 @@
var Marionette = require('marionette');
module.exports = Marionette.ItemView.extend({
template : 'Activity/Blacklist/Details/BlacklistDetailsViewTemplate'
});
@@ -0,0 +1,23 @@
<dl class="dl-horizontal info">
<dt>Name:</dt>
<dd>{{sourceTitle}}</dd>
{{#if protocol}}
{{#unless_eq protocol compare="unknown"}}
<dt>Protocol:</dt>
<dd>{{protocol}}</dd>
{{/unless_eq}}
{{/if}}
{{#if indexer}}
<dt>Indexer:</dt>
<dd>{{indexer}}</dd>
{{/if}}
{{#if message}}
<dt>Message:</dt>
<dd>{{message}}</dd>
{{/if}}
</dl>