mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-28 21:12:43 +02:00
Indexer flags implementation. (#1377) Will be further finalized over the next few weeks with Freelech, preferring of certain flags, etc
This commit is contained in:
@@ -9,6 +9,24 @@ module.exports = NzbDroneCell.extend({
|
||||
var title = this.model.get('title');
|
||||
var infoUrl = this.model.get('infoUrl');
|
||||
|
||||
var flags = this.model.get("indexerFlags");
|
||||
if (flags) {
|
||||
_.each(flags, function(flag){
|
||||
var addon = "";
|
||||
|
||||
switch (flag) {
|
||||
case "PTP_Golden":
|
||||
addon = "🍿";
|
||||
break;
|
||||
case "PTP_Approved":
|
||||
addon = "✔";
|
||||
break;
|
||||
}
|
||||
|
||||
title += addon;
|
||||
});
|
||||
}
|
||||
|
||||
if (infoUrl) {
|
||||
this.$el.html('<a href="{0}">{1}</a>'.format(infoUrl, title));
|
||||
} else {
|
||||
|
@@ -8,6 +8,7 @@ var QualityCell = require('../Cells/QualityCell');
|
||||
var ApprovalStatusCell = require('../Cells/ApprovalStatusCell');
|
||||
var LoadingView = require('../Shared/LoadingView');
|
||||
var EditionCell = require('../Cells/EditionCell');
|
||||
var ReleaseTitleCell = require("./ReleaseTitleCell");
|
||||
|
||||
module.exports = Marionette.Layout.extend({
|
||||
template : 'Release/ReleaseLayoutTemplate',
|
||||
@@ -34,7 +35,7 @@ module.exports = Marionette.Layout.extend({
|
||||
name : 'title',
|
||||
label : 'Title',
|
||||
sortable : true,
|
||||
cell : Backgrid.StringCell
|
||||
cell : ReleaseTitleCell
|
||||
},
|
||||
/*{
|
||||
name : 'episodeNumbers',
|
||||
|
33
src/UI/Release/ReleaseTitleCell.js
Normal file
33
src/UI/Release/ReleaseTitleCell.js
Normal file
@@ -0,0 +1,33 @@
|
||||
var _ = require('underscore');
|
||||
var Backgrid = require('backgrid');
|
||||
|
||||
var FormatHelpers = require('../Shared/FormatHelpers');
|
||||
|
||||
module.exports = Backgrid.Cell.extend({
|
||||
className : 'title-cell',
|
||||
|
||||
render : function() {
|
||||
debugger;
|
||||
var title = this.model.get('title');
|
||||
var flags = this.model.get("indexerFlags");
|
||||
if (flags) {
|
||||
_.each(flags, function(flag){
|
||||
var addon = "";
|
||||
debugger;
|
||||
switch (flag) {
|
||||
case "PTP_Golden":
|
||||
addon = "🍿";
|
||||
break;
|
||||
case "PTP_Approved":
|
||||
addon = "✔";
|
||||
break;
|
||||
}
|
||||
|
||||
title += addon;
|
||||
});
|
||||
}
|
||||
this.$el.html(title);
|
||||
|
||||
return this;
|
||||
}
|
||||
});
|
Reference in New Issue
Block a user