From 7bb319b6d6fbf590117fc81ce4857f89c3e6858e Mon Sep 17 00:00:00 2001 From: Tim Turner Date: Thu, 26 Jan 2017 19:16:19 -0500 Subject: [PATCH] Update Files tab when movie renamed --- src/UI/Movies/Files/FilesLayout.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/UI/Movies/Files/FilesLayout.js b/src/UI/Movies/Files/FilesLayout.js index 3e6dd2bdd..15b1e32af 100644 --- a/src/UI/Movies/Files/FilesLayout.js +++ b/src/UI/Movies/Files/FilesLayout.js @@ -74,6 +74,19 @@ module.exports = Marionette.Layout.extend({ var file = movie.model.get("movieFile"); this.filesCollection.add(file); //this.listenTo(this.releaseCollection, 'sync', this._showSearchResults); + + this.listenTo(this.model, 'change', function(model, options) { + if (options && options.changeSource === 'signalr') { + this._refresh(movie); + } + }); + }, + + _refresh : function(movie) { + this.filesCollection = new FilesCollection(); + var file = movie.model.get("movieFile"); + this.filesCollection.add(file); + this.onShow(); }, onShow : function() {