1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2025-07-05 00:49:20 +02:00
Files
Sonarr/UI/Missing/Collection.js

38 lines
1000 B
JavaScript
Raw Normal View History

"use strict";
define(['app', 'Series/EpisodeModel', 'backbone.pageable'], function (app, EpisodeModel, PagableCollection) {
NzbDrone.Missing.Collection = PagableCollection.extend({
url : NzbDrone.Constants.ApiRoot + '/missing',
model: NzbDrone.Series.EpisodeModel,
2013-05-01 00:34:05 -07:00
state: {
2013-05-23 17:57:34 -07:00
pageSize: 15,
sortKey : "airDate",
order : 1
2013-05-01 00:34:05 -07:00
},
queryParams: {
totalPages : null,
2013-05-01 00:34:05 -07:00
totalRecords: null,
pageSize : 'pageSize',
sortKey : "sortKey",
order : "sortDir",
directions : {
2013-05-01 00:34:05 -07:00
"-1": "asc",
"1" : "desc"
2013-05-01 00:34:05 -07:00
}
2013-05-01 22:50:34 -07:00
},
parseState: function (resp, queryParams, state) {
return {totalRecords: resp.totalRecords};
},
parseRecords: function (resp) {
if (resp) {
return resp.records;
}
return resp;
2013-03-20 20:02:57 -07:00
}
});
});