mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-23 06:45:19 -07:00
When refreshing movie, refresh Files tab
This commit is contained in:
parent
1e28a2e5d4
commit
81688399c0
2 changed files with 24 additions and 16 deletions
|
@ -74,6 +74,10 @@ module.exports = Marionette.Layout.extend({
|
|||
this.listenTo(this.model, 'change:images', this._updateImages);
|
||||
},
|
||||
|
||||
_refreshFiles : function() {
|
||||
this._showFiles();
|
||||
},
|
||||
|
||||
onShow : function() {
|
||||
this.searchLayout = new SearchLayout({ model : this.model });
|
||||
this.searchLayout.startManualSearch = true;
|
||||
|
|
|
@ -83,17 +83,21 @@ module.exports = Marionette.Layout.extend({
|
|||
//this.listenTo(this.releaseCollection, 'sync', this._showSearchResults);
|
||||
this.listenTo(this.model, 'change', function(model, options) {
|
||||
if (options && options.changeSource === 'signalr') {
|
||||
this._refresh(movie);
|
||||
this._refresh(model);
|
||||
}
|
||||
});
|
||||
|
||||
vent.on(vent.Commands.CloseModalCommand, this._refreshClose, this);
|
||||
},
|
||||
|
||||
_refresh : function(movie) {
|
||||
_refresh : function(model) {
|
||||
this.filesCollection = new FilesCollection();
|
||||
var file = movie.model.get("movieFile");
|
||||
|
||||
if(model.get('hasFile')) {
|
||||
var file = model.get("movieFile");
|
||||
this.filesCollection.add(file);
|
||||
}
|
||||
|
||||
this.onShow();
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue