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

42 lines
1.1 KiB
JavaScript
Raw Normal View History

'use strict';
define(
[
'Series/EpisodeModel',
'backbone.pageable'
], function (EpisodeModel, PagableCollection) {
return PagableCollection.extend({
2013-09-14 10:10:19 +03:00
url : window.NzbDrone.ApiRoot + '/missing',
model: EpisodeModel,
2013-05-01 10:34:05 +03:00
state: {
pageSize: 15,
2013-07-24 08:28:06 +03:00
sortKey : 'airDateUtc',
order : 1
},
2013-05-01 10:34:05 +03:00
queryParams: {
totalPages : null,
totalRecords: null,
pageSize : 'pageSize',
sortKey : 'sortKey',
order : 'sortDir',
directions : {
'-1': 'asc',
'1' : 'desc'
}
},
2013-05-02 08:50:34 +03:00
parseState: function (resp) {
return {totalRecords: resp.totalRecords};
},
2013-05-02 08:50:34 +03:00
parseRecords: function (resp) {
if (resp) {
return resp.records;
}
2013-05-02 08:50:34 +03:00
return resp;
}
});
2013-03-21 06:02:57 +03:00
});