1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-22 22:15:17 -04:00

Fixed adding multiple movies.

This commit is contained in:
Leonardo Galli
2017-01-03 12:52:09 +01:00
parent 4f6380a73c
commit 329786365d
4 changed files with 39 additions and 5 deletions
+13 -1
View File
@@ -21,9 +21,21 @@ module.exports = Marionette.CollectionView.extend({
return this.showing >= this.collection.length;
},
setExisting : function(imdbid) {
var movies = this.collection.where({ imdbId : imdbid });
console.warn(movies)
//debugger;
if (movies.length > 0) {
this.children.findByModel(movies[0])._configureTemplateHelpers();
//this.children.findByModel(movies[0])._configureTemplateHelpers();
this.children.findByModel(movies[0]).render();
//this.templateHelpers.existing = existingMovies[0].toJSON();
}
},
appendHtml : function(collectionView, itemView, index) {
if (!this.isExisting || index < this.showing || index === 0) {
collectionView.$el.append(itemView.el);
}
}
});
});