mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-14 00:53:57 -07:00
episodes for series are now fetched using a single call and broken into seasons.
This commit is contained in:
parent
f7c78da4ed
commit
0c63e5ad81
12 changed files with 120 additions and 48 deletions
|
@ -2,6 +2,14 @@
|
|||
define(['app', 'Series/EpisodeModel'], function () {
|
||||
NzbDrone.Series.EpisodeCollection = Backbone.Collection.extend({
|
||||
url : NzbDrone.Constants.ApiRoot + '/episodes',
|
||||
model: NzbDrone.Series.EpisodeModel
|
||||
model: NzbDrone.Series.EpisodeModel,
|
||||
|
||||
bySeason: function (season) {
|
||||
var filtered = this.filter(function (episode) {
|
||||
return episode.get("seasonNumber") === season;
|
||||
});
|
||||
|
||||
return new NzbDrone.Series.EpisodeCollection(filtered);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue