Fixed: Language sort on Interactive Search page

pull/5048/head
Qstick 4 years ago
parent 959d63b4eb
commit 31ca413fc7

@ -54,7 +54,7 @@ const columns = [
isVisible: true isVisible: true
}, },
{ {
name: 'languageWeight', name: 'languages',
label: translate('Language'), label: translate('Language'),
isSortable: true, isSortable: true,
isVisible: true isVisible: true

@ -29,6 +29,7 @@ export const defaultState = {
age: function(item, direction) { age: function(item, direction) {
return item.ageMinutes; return item.ageMinutes;
}, },
peers: function(item, direction) { peers: function(item, direction) {
const seeders = item.seeders || 0; const seeders = item.seeders || 0;
const leechers = item.leechers || 0; const leechers = item.leechers || 0;
@ -36,6 +37,14 @@ export const defaultState = {
return seeders * 1000000 + leechers; return seeders * 1000000 + leechers;
}, },
languages: function(item, direction) {
if (item.languages.length > 1) {
return 10000;
}
return item.languages[0].id;
},
indexerFlags: function(item, direction) { indexerFlags: function(item, direction) {
const indexerFlags = item.indexerFlags; const indexerFlags = item.indexerFlags;
const releaseWeight = item.releaseWeight; const releaseWeight = item.releaseWeight;

Loading…
Cancel
Save