diff --git a/src/UI/Series/Details/InfoView.js b/src/UI/Series/Details/InfoView.js
index 60389b17d..a6992da8a 100644
--- a/src/UI/Series/Details/InfoView.js
+++ b/src/UI/Series/Details/InfoView.js
@@ -7,8 +7,17 @@ define(
return Marionette.ItemView.extend({
template: 'Series/Details/InfoViewTemplate',
- initialize: function () {
+ initialize: function (options) {
+ this.episodeFileCollection = options.episodeFileCollection;
+
this.listenTo(this.model, 'change', this.render);
+ this.listenTo(this.episodeFileCollection, 'sync', this.render);
+ },
+
+ templateHelpers: function() {
+ return {
+ fileCount: this.episodeFileCollection.length
+ };
}
});
});
diff --git a/src/UI/Series/Details/InfoViewTemplate.hbs b/src/UI/Series/Details/InfoViewTemplate.hbs
index fdf2e1b86..843aaf2ef 100644
--- a/src/UI/Series/Details/InfoViewTemplate.hbs
+++ b/src/UI/Series/Details/InfoViewTemplate.hbs
@@ -5,7 +5,7 @@
{{runtime}} minutes
{{path}}
{{Bytes sizeOnDisk}}
- {{episodeFileCount}} files
+ {{fileCount}} files
{{#if_eq status compare="continuing"}}
Continuing
{{else}}
diff --git a/src/UI/Series/Details/SeriesDetailsLayout.js b/src/UI/Series/Details/SeriesDetailsLayout.js
index 1f8e2e0da..553c6a828 100644
--- a/src/UI/Series/Details/SeriesDetailsLayout.js
+++ b/src/UI/Series/Details/SeriesDetailsLayout.js
@@ -211,7 +211,7 @@ define(
},
_showInfo: function () {
- this.info.show(new InfoView({ model: this.model }));
+ this.info.show(new InfoView({ model: this.model, episodeFileCollection: this.episodeFileCollection }));
},
_commandComplete: function (options) {
diff --git a/src/UI/Series/EpisodeFileCollection.js b/src/UI/Series/EpisodeFileCollection.js
index 42472d0ed..40322b133 100644
--- a/src/UI/Series/EpisodeFileCollection.js
+++ b/src/UI/Series/EpisodeFileCollection.js
@@ -12,6 +12,7 @@ define(
initialize: function (options) {
this.seriesId = options.seriesId;
+ this.models = [];
},
fetch: function (options) {