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', name : 'protocol',
label : 'Source', label : 'Source',
cell : ProtocolCell cell : ProtocolCell
}, { },
{
name : 'age', name : 'age',
label : 'Age', label : 'Age',
cell : AgeCell cell : AgeCell
@ -66,7 +67,7 @@ define(
name : 'download', name : 'download',
label : '', label : '',
cell : DownloadReportCell, 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; 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) { fetchEpisodeReleases: function (episodeId) {