1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-16 11:37:58 +02:00
Sonarr/UI/Missing/Collection.js

37 lines
937 B
JavaScript
Raw Normal View History

"use strict";
2013-05-01 06:14:54 +03:00
define(['app', 'Series/EpisodeModel'], function () {
NzbDrone.Missing.Collection = Backbone.PageableCollection.extend({
url : NzbDrone.Constants.ApiRoot + '/missing',
2013-05-01 03:25:33 +03:00
model : NzbDrone.Series.EpisodeModel,
2013-05-01 10:34:05 +03:00
state: {
2013-05-24 03:57:34 +03:00
pageSize: 15,
2013-05-01 10:34:05 +03:00
sortKey: "airDate",
order: 1
},
queryParams: {
totalPages: null,
totalRecords: null,
pageSize: 'pageSize',
2013-05-02 08:50:34 +03:00
sortKey: "sortKey",
order: "sortDir",
2013-05-01 10:34:05 +03:00
directions: {
"-1": "asc",
"1": "desc"
}
2013-05-02 08:50:34 +03:00
},
parseState: function (resp, queryParams, state) {
return {totalRecords: resp.totalRecords};
},
parseRecords: function (resp) {
if (resp) {
return resp.records;
}
return resp;
2013-03-21 06:02:57 +03:00
}
});
});