|
|
|
@ -186,6 +186,10 @@ define(
|
|
|
|
|
this.episodeCollection = new EpisodeCollection({ seriesId: this.model.id }).bindSignalR();
|
|
|
|
|
this.episodeFileCollection = new EpisodeFileCollection({ seriesId: this.model.id }).bindSignalR();
|
|
|
|
|
|
|
|
|
|
reqres.setHandler(reqres.Requests.GetEpisodeFileById, function (episodeFileId) {
|
|
|
|
|
return self.episodeFileCollection.get(episodeFileId);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$.when(this.episodeCollection.fetch(), this.episodeFileCollection.fetch()).done(function () {
|
|
|
|
|
var seasonCollectionView = new SeasonCollectionView({
|
|
|
|
|
collection : self.seasonCollection,
|
|
|
|
@ -193,10 +197,6 @@ define(
|
|
|
|
|
series : self.model
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
reqres.setHandler(reqres.Requests.GetEpisodeFileById, function (episodeFileId) {
|
|
|
|
|
return self.episodeFileCollection.get(episodeFileId);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
self.seasons.show(seasonCollectionView);
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|