2013-03-29 18:37:10 +00:00
|
|
|
|
"use strict";
|
2013-06-14 23:18:37 +00:00
|
|
|
|
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 07:34:05 +00:00
|
|
|
|
|
|
|
|
|
state: {
|
2013-05-24 00:57:34 +00:00
|
|
|
|
pageSize: 15,
|
2013-06-14 23:18:37 +00:00
|
|
|
|
sortKey : "airDate",
|
|
|
|
|
order : 1
|
2013-05-01 07:34:05 +00:00
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
queryParams: {
|
2013-06-14 23:18:37 +00:00
|
|
|
|
totalPages : null,
|
2013-05-01 07:34:05 +00:00
|
|
|
|
totalRecords: null,
|
2013-06-14 23:18:37 +00:00
|
|
|
|
pageSize : 'pageSize',
|
|
|
|
|
sortKey : "sortKey",
|
|
|
|
|
order : "sortDir",
|
|
|
|
|
directions : {
|
2013-05-01 07:34:05 +00:00
|
|
|
|
"-1": "asc",
|
2013-06-14 23:18:37 +00:00
|
|
|
|
"1" : "desc"
|
2013-05-01 07:34:05 +00:00
|
|
|
|
}
|
2013-05-02 05:50:34 +00:00
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
parseState: function (resp, queryParams, state) {
|
|
|
|
|
return {totalRecords: resp.totalRecords};
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
parseRecords: function (resp) {
|
|
|
|
|
if (resp) {
|
|
|
|
|
return resp.records;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return resp;
|
2013-03-21 03:02:57 +00:00
|
|
|
|
}
|
|
|
|
|
});
|
2013-06-14 23:18:37 +00:00
|
|
|
|
});
|