mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-06 02:52:41 +01:00
Merged patch/update-files-tab-onChange into develop
This commit is contained in:
commit
7a86c78896
@ -74,6 +74,10 @@ module.exports = Marionette.Layout.extend({
|
|||||||
this.listenTo(this.model, 'change:images', this._updateImages);
|
this.listenTo(this.model, 'change:images', this._updateImages);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_refreshFiles : function() {
|
||||||
|
this._showFiles();
|
||||||
|
},
|
||||||
|
|
||||||
onShow : function() {
|
onShow : function() {
|
||||||
this.searchLayout = new SearchLayout({ model : this.model });
|
this.searchLayout = new SearchLayout({ model : this.model });
|
||||||
this.searchLayout.startManualSearch = true;
|
this.searchLayout.startManualSearch = true;
|
||||||
|
@ -83,17 +83,21 @@ module.exports = Marionette.Layout.extend({
|
|||||||
//this.listenTo(this.releaseCollection, 'sync', this._showSearchResults);
|
//this.listenTo(this.releaseCollection, 'sync', this._showSearchResults);
|
||||||
this.listenTo(this.model, 'change', function(model, options) {
|
this.listenTo(this.model, 'change', function(model, options) {
|
||||||
if (options && options.changeSource === 'signalr') {
|
if (options && options.changeSource === 'signalr') {
|
||||||
this._refresh(movie);
|
this._refresh(model);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
vent.on(vent.Commands.CloseModalCommand, this._refreshClose, this);
|
vent.on(vent.Commands.CloseModalCommand, this._refreshClose, this);
|
||||||
},
|
},
|
||||||
|
|
||||||
_refresh : function(movie) {
|
_refresh : function(model) {
|
||||||
this.filesCollection = new FilesCollection();
|
this.filesCollection = new FilesCollection();
|
||||||
var file = movie.model.get("movieFile");
|
|
||||||
|
if(model.get('hasFile')) {
|
||||||
|
var file = model.get("movieFile");
|
||||||
this.filesCollection.add(file);
|
this.filesCollection.add(file);
|
||||||
|
}
|
||||||
|
|
||||||
this.onShow();
|
this.onShow();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user