diff --git a/UI/Episode/Layout.js b/UI/Episode/Layout.js index 15f819a48..54dfbd231 100644 --- a/UI/Episode/Layout.js +++ b/UI/Episode/Layout.js @@ -36,9 +36,8 @@ define( initialize: function (options) { this.templateHelpers.hideSeriesLink = options.hideSeriesLink; - var series = SeriesCollection.find({ id: this.model.get('seriesId') }); - this.templateHelpers.series = series.toJSON(); - var test = 1; + this.series = SeriesCollection.find({ id: this.model.get('seriesId') }); + this.templateHelpers.series = this.series.toJSON(); }, onShow: function () { @@ -53,7 +52,7 @@ define( } this.ui.summary.tab('show'); - this.summary.show(new SummaryLayout({model: this.model})); + this.summary.show(new SummaryLayout({model: this.model, series: this.series})); }, _showActivity: function (e) { diff --git a/UI/Episode/LayoutTemplate.html b/UI/Episode/LayoutTemplate.html index c93e1f98c..982110d6a 100644 --- a/UI/Episode/LayoutTemplate.html +++ b/UI/Episode/LayoutTemplate.html @@ -3,7 +3,6 @@

- {{debug}} {{#if episodeTitle}} {{title}} - {{EpisodeNumber}} - {{episodeTitle}} diff --git a/UI/Episode/Summary/Layout.js b/UI/Episode/Summary/Layout.js index f47d3ae15..b2ecd2c60 100644 --- a/UI/Episode/Summary/Layout.js +++ b/UI/Episode/Summary/Layout.js @@ -39,6 +39,14 @@ define( } ], + templateHelpers: {}, + + initialize: function (options) { + if (!this.model.series) { + this.templateHelpers.series = options.series.toJSON(); + } + }, + onShow: function () { if (this.model.get('episodeFile')) { this.activity.show(new Backgrid.Grid({ diff --git a/UI/Episode/Summary/LayoutTemplate.html b/UI/Episode/Summary/LayoutTemplate.html index 1263ad98e..a8c765b6c 100644 --- a/UI/Episode/Summary/LayoutTemplate.html +++ b/UI/Episode/Summary/LayoutTemplate.html @@ -1,4 +1,5 @@ 
+ {{debug}} {{#with series}} {{qualityProfile qualityProfileId}} {{network}}