Sorting now working according to quality in release collection. Fixes #85.

pull/2/head
Leonardo Galli 8 years ago
parent 2cbe17151d
commit 5e8b617625

@ -97,7 +97,7 @@ namespace NzbDrone.Api.Indexers
{ {
Guid = releaseInfo.Guid, Guid = releaseInfo.Guid,
Quality = parsedMovieInfo.Quality, Quality = parsedMovieInfo.Quality,
//QualityWeight QualityWeight = parsedMovieInfo.Quality.Quality.Id, //Id kinda hacky for wheight, but what you gonna do? TODO: Fix this shit!
Age = releaseInfo.Age, Age = releaseInfo.Age,
AgeHours = releaseInfo.AgeHours, AgeHours = releaseInfo.AgeHours,
AgeMinutes = releaseInfo.AgeMinutes, AgeMinutes = releaseInfo.AgeMinutes,

@ -4,5 +4,7 @@ var QualityCellEditor = require('./Edit/QualityCellEditor');
module.exports = TemplatedCell.extend({ module.exports = TemplatedCell.extend({
className : 'quality-cell', className : 'quality-cell',
template : 'Cells/QualityCellTemplate', template : 'Cells/QualityCellTemplate',
editor : QualityCellEditor editor : QualityCellEditor,
}); });

@ -37,7 +37,7 @@ module.exports = Marionette.Layout.extend({
name : 'edition', name : 'edition',
label : 'Edition', label : 'Edition',
cell : EditionCell, cell : EditionCell,
title : "Edition" title : "Edition",
}, },
{ {
name : 'indexer', name : 'indexer',
@ -57,7 +57,7 @@ module.exports = Marionette.Layout.extend({
{ {
name : 'quality', name : 'quality',
label : 'Quality', label : 'Quality',
cell : QualityCell cell : QualityCell,
}, },
{ {
name : 'rejections', name : 'rejections',

@ -1,2 +1 @@
<div id="episode-release-grid" class="table-responsive"></div> <div id="episode-release-grid" class="table-responsive"></div>
<button class="btn x-search-back">Back</button>

@ -16,7 +16,7 @@ var Collection = PagableCollection.extend({
sortMappings : { sortMappings : {
'quality' : { 'quality' : {
sortKey : 'qualityWeight' sortKey : "qualityWeight"
}, },
'rejections' : { 'rejections' : {
sortValue : function(model) { sortValue : function(model) {
@ -30,6 +30,9 @@ var Collection = PagableCollection.extend({
return releaseWeight; return releaseWeight;
} }
}, },
"edition" : {
sortKey : "edition"
},
'download' : { 'download' : {
sortKey : 'releaseWeight' sortKey : 'releaseWeight'
}, },

Loading…
Cancel
Save