mirror of
https://github.com/lidarr/Lidarr
synced 2025-03-13 07:23:14 +00:00
Fixed: show proper episode file count on series details
This commit is contained in:
parent
c159a378a0
commit
ea43d78ad1
4 changed files with 13 additions and 3 deletions
|
@ -7,8 +7,17 @@ define(
|
||||||
return Marionette.ItemView.extend({
|
return Marionette.ItemView.extend({
|
||||||
template: 'Series/Details/InfoViewTemplate',
|
template: 'Series/Details/InfoViewTemplate',
|
||||||
|
|
||||||
initialize: function () {
|
initialize: function (options) {
|
||||||
|
this.episodeFileCollection = options.episodeFileCollection;
|
||||||
|
|
||||||
this.listenTo(this.model, 'change', this.render);
|
this.listenTo(this.model, 'change', this.render);
|
||||||
|
this.listenTo(this.episodeFileCollection, 'sync', this.render);
|
||||||
|
},
|
||||||
|
|
||||||
|
templateHelpers: function() {
|
||||||
|
return {
|
||||||
|
fileCount: this.episodeFileCollection.length
|
||||||
|
};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<span class="label label-info">{{runtime}} minutes</span>
|
<span class="label label-info">{{runtime}} minutes</span>
|
||||||
<span class="label label-info">{{path}}</span>
|
<span class="label label-info">{{path}}</span>
|
||||||
<span class="label label-info">{{Bytes sizeOnDisk}}</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"}}
|
{{#if_eq status compare="continuing"}}
|
||||||
<span class="label label-info">Continuing</span>
|
<span class="label label-info">Continuing</span>
|
||||||
{{else}}
|
{{else}}
|
||||||
|
|
|
@ -211,7 +211,7 @@ define(
|
||||||
},
|
},
|
||||||
|
|
||||||
_showInfo: function () {
|
_showInfo: function () {
|
||||||
this.info.show(new InfoView({ model: this.model }));
|
this.info.show(new InfoView({ model: this.model, episodeFileCollection: this.episodeFileCollection }));
|
||||||
},
|
},
|
||||||
|
|
||||||
_commandComplete: function (options) {
|
_commandComplete: function (options) {
|
||||||
|
|
|
@ -12,6 +12,7 @@ define(
|
||||||
|
|
||||||
initialize: function (options) {
|
initialize: function (options) {
|
||||||
this.seriesId = options.seriesId;
|
this.seriesId = options.seriesId;
|
||||||
|
this.models = [];
|
||||||
},
|
},
|
||||||
|
|
||||||
fetch: function (options) {
|
fetch: function (options) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue