mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -07:00
Using reqres to map episode to episode file
This commit is contained in:
parent
8737cb0145
commit
b1899b5f6f
8 changed files with 73 additions and 16 deletions
|
@ -1,12 +1,14 @@
|
|||
'use strict';
|
||||
define(
|
||||
[
|
||||
'app',
|
||||
'marionette',
|
||||
'backgrid',
|
||||
'Series/EpisodeFileCollection',
|
||||
'Cells/FileSizeCell',
|
||||
'Cells/QualityCell',
|
||||
'Episode/Summary/NoFileView'
|
||||
], function (Marionette, Backgrid, FileSizeCell, QualityCell, NoFileView) {
|
||||
], function (App, Marionette, Backgrid, EpisodeFileCollection, FileSizeCell, QualityCell, NoFileView) {
|
||||
|
||||
return Marionette.Layout.extend({
|
||||
template: 'Episode/Summary/LayoutTemplate',
|
||||
|
@ -48,9 +50,11 @@ define(
|
|||
},
|
||||
|
||||
onShow: function () {
|
||||
if (this.model.get('episodeFile')) {
|
||||
if (this.model.get('hasFile')) {
|
||||
var episodeFile = App.request(App.Reqres.GetEpisodeFileById, this.model.get('episodeFileId'));
|
||||
|
||||
this.activity.show(new Backgrid.Grid({
|
||||
collection: new Backbone.Collection(this.model.get('episodeFile')),
|
||||
collection: new EpisodeFileCollection(episodeFile, { seriesId: this.model.get('seriesId') }),
|
||||
columns : this.columns,
|
||||
className : 'table table-bordered'
|
||||
}));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue