1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-04 10:02:40 +01:00

Fixed: show proper episode file count on series details

This commit is contained in:
Mark McDowall 2014-11-01 23:20:41 -07:00
parent c159a378a0
commit ea43d78ad1
4 changed files with 13 additions and 3 deletions

View File

@ -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
};
}
});
});

View File

@ -5,7 +5,7 @@
<span class="label label-info">{{runtime}} minutes</span>
<span class="label label-info">{{path}}</span>
<span class="label label-info">{{Bytes sizeOnDisk}}</span>
<span class="label label-info">{{episodeFileCount}} files</span>
<span class="label label-info">{{fileCount}} files</span>
{{#if_eq status compare="continuing"}}
<span class="label label-info">Continuing</span>
{{else}}

View File

@ -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) {

View File

@ -12,6 +12,7 @@ define(
initialize: function (options) {
this.seriesId = options.seriesId;
this.models = [];
},
fetch: function (options) {