mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-23 06:45:19 -07:00
fix the footer to show correct information and refresh when FullCollection changes (#893)
This commit is contained in:
parent
997dce288d
commit
55ac2dd1bb
1 changed files with 65 additions and 58 deletions
|
@ -122,9 +122,13 @@ module.exports = Marionette.Layout.extend({
|
|||
initialize : function() {
|
||||
this.seriesCollection = MoviesCollection.clone();
|
||||
this.seriesCollection.bindSignalR();
|
||||
this.fullCollection = FullMovieCollection;
|
||||
|
||||
//this.fullCollection = FullMovieCollection;
|
||||
|
||||
//need to add this so the footer gets refreshed
|
||||
this.listenTo(FullMovieCollection, 'sync', function(model, collection, options) {
|
||||
//this._renderView();
|
||||
this._showFooter();
|
||||
});
|
||||
|
||||
this.listenTo(this.seriesCollection, 'sync', function(model, collection, options) {
|
||||
//this.seriesCollection.fullCollection.resetFiltered();
|
||||
|
@ -310,7 +314,7 @@ module.exports = Marionette.Layout.extend({
|
|||
//debugger;
|
||||
});
|
||||
this._showToolbar();
|
||||
this._showFooter();
|
||||
//this._showFooter();
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -362,7 +366,10 @@ module.exports = Marionette.Layout.extend({
|
|||
|
||||
_showFooter : function() {
|
||||
var footerModel = new FooterModel();
|
||||
var movies = MoviesCollection.models.length;
|
||||
var movies = FullMovieCollection.models.length;
|
||||
//instead of all the counters could do something like this with different query in the where...
|
||||
//var releasedMovies = FullMovieCollection.where({ 'released' : this.model.get('released') });
|
||||
// releasedMovies.length
|
||||
|
||||
var announced = 0;
|
||||
var incinemas = 0;
|
||||
|
@ -378,7 +385,7 @@ module.exports = Marionette.Layout.extend({
|
|||
|
||||
var downloadedNotMonitored=0;
|
||||
|
||||
_.each(MoviesCollection.models, function(model) {
|
||||
_.each(FullMovieCollection.models, function(model) {
|
||||
|
||||
if (model.get('status').toLowerCase() === 'released') {
|
||||
released++;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue