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

This commit is contained in:
Leonardo Galli 2017-01-11 22:27:37 +01:00
parent 2cbe17151d
commit 5e8b617625
5 changed files with 11 additions and 7 deletions

View File

@ -97,7 +97,7 @@ namespace NzbDrone.Api.Indexers
{
Guid = releaseInfo.Guid,
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,
AgeHours = releaseInfo.AgeHours,
AgeMinutes = releaseInfo.AgeMinutes,

View File

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

View File

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

View File

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

View File

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