Fixed: UI now properly sorts on the Peers column.

This commit is contained in:
Taloth Saldono 2014-12-25 23:59:52 +01:00
parent 8a1ed896ea
commit 8306305207
2 changed files with 11 additions and 3 deletions

View File

@ -26,7 +26,8 @@ define(
name : 'protocol',
label : 'Source',
cell : ProtocolCell
}, {
},
{
name : 'age',
label : 'Age',
cell : AgeCell
@ -66,7 +67,7 @@ define(
name : 'download',
label : '',
cell : DownloadReportCell,
sortable : false
sortable : true // Is the default sort, which sorts by the internal prioritization logic.
}
],

View File

@ -30,7 +30,14 @@ define(
return releaseWeight;
}
},
'download' : { sortKey: 'releaseWeight' }
'download' : { sortKey: 'releaseWeight' },
'seeders' : { sortValue: function(model) {
var seeders = model.get('seeders') || 0;
var leechers = model.get('leechers') || 0;
return seeders * 1000000 + leechers;
}
}
},
fetchEpisodeReleases: function (episodeId) {