mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-17 21:26:22 -04:00
fix client mode fetching.. only setPageSize when necessary
This commit is contained in:
@@ -84,8 +84,8 @@ module.exports = Marionette.Layout.extend({
|
||||
initialize : function() {
|
||||
this.movieCollection = MoviesCollection.clone();
|
||||
var pageSize = parseInt(Config.getValue("pageSize")) || 10;
|
||||
this.movieCollection.switchMode('client');
|
||||
this.movieCollection.setPageSize(pageSize);
|
||||
this.movieCollection.switchMode('client', {fetch: false});
|
||||
this.movieCollection.setPageSize(pageSize, {fetch: true});
|
||||
this.movieCollection.bindSignalR();
|
||||
this.movieCollection.fullCollection.bindSignalR();
|
||||
|
||||
|
||||
@@ -142,7 +142,9 @@ module.exports = Marionette.Layout.extend({
|
||||
//debugger;
|
||||
this.seriesCollection.bindSignalR();
|
||||
var pageSize = parseInt(Config.getValue("pageSize")) || 10;
|
||||
// this.seriesCollection.setPageSize(pageSize);
|
||||
if (this.series.state.pageSize !== pageSize) {
|
||||
this.seriesCollection.setPageSize(pageSize);
|
||||
}
|
||||
//this.listenTo(MoviesCollection, 'sync', function() {
|
||||
// this.seriesCollection.fetch();
|
||||
//});
|
||||
|
||||
@@ -86,6 +86,9 @@ var Collection = PageableCollection.extend({
|
||||
},
|
||||
|
||||
parseState : function(resp) {
|
||||
if (this.mode === 'client') {
|
||||
return {};
|
||||
}
|
||||
var direction = -1;
|
||||
if (resp.sortDirection == "descending") {
|
||||
direction = 1;
|
||||
@@ -94,7 +97,7 @@ var Collection = PageableCollection.extend({
|
||||
},
|
||||
|
||||
parseRecords : function(resp) {
|
||||
if (resp) {
|
||||
if (resp && this.mode !== 'client') {
|
||||
return resp.records;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user