mirror of
https://github.com/Radarr/Radarr
synced 2025-01-19 14:11:40 +00:00
keep the current page the same after clicking Save
the path needs to be updated on models that are changes
This commit is contained in:
parent
db6e91cd95
commit
e6dfd89300
1 changed files with 5 additions and 1 deletions
|
@ -109,6 +109,7 @@ module.exports = Marionette.ItemView.extend({
|
|||
});
|
||||
var filterKey = this.moviesCollection.state.filterKey;
|
||||
var filterValue = this.moviesCollection.state.filterValue;
|
||||
var currentPage = this.moviesCollection.state.currentPage;
|
||||
this.moviesCollection.setFilterMode('all');
|
||||
//this.moviesCollection.fullCollection.resetFiltered();
|
||||
for (var j=0; j<i; j++) {
|
||||
|
@ -136,13 +137,16 @@ module.exports = Marionette.ItemView.extend({
|
|||
|
||||
if (rootFolder !== 'noChange') {
|
||||
var rootFolderPath = RootFolders.get(parseInt(rootFolder, 10));
|
||||
m.set('rootFolderPath', rootFolderPath.get('path'));
|
||||
var currentPath = m.get('path');
|
||||
var folderName = currentPath.substring(currentPath.lastIndexOf('\\')+1);
|
||||
m.set('path', rootFolderPath.get('path')+ folderName);
|
||||
}
|
||||
}
|
||||
}
|
||||
this.moviesCollection.state.filterKey = filterKey;
|
||||
this.moviesCollection.state.filterValue = filterValue;
|
||||
this.moviesCollection.fullCollection.resetFiltered();
|
||||
this.moviesCollection.getPage(currentPage, { fetch: false});
|
||||
|
||||
FullMovieCollection.save();
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue