mirror of https://github.com/Radarr/Radarr
Episode grid is sorted by episode number descending
This commit is contained in:
parent
1bf855ca3a
commit
8f0d3e2e3b
|
@ -16,6 +16,22 @@ define(
|
||||||
var EpisodeCollection = require('Series/EpisodeCollection');
|
var EpisodeCollection = require('Series/EpisodeCollection');
|
||||||
|
|
||||||
return new EpisodeCollection(filtered);
|
return new EpisodeCollection(filtered);
|
||||||
|
},
|
||||||
|
|
||||||
|
comparator: function (model1, model2) {
|
||||||
|
var episode1 = model1.get('episodeNumber');
|
||||||
|
|
||||||
|
var episode2 = model2.get('episodeNumber');
|
||||||
|
|
||||||
|
if (episode1 < episode2){
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (episode1 > episode2){
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue