Files
Prowlarr-Prowlarr/src/UI/Wanted/Missing/MissingCollection.js
Taloth Saldono d416dd4177 Repurposed the Missing page to include filter options and display episodes that haven't reached cutoff.
--HG--
rename : src/NzbDrone.Api/Missing/MissingModule.cs => src/NzbDrone.Api/Wanted/MissingModule.cs
rename : src/UI/Missing/ControlsColumnTemplate.html => src/UI/Wanted/ControlsColumnTemplate.html
rename : src/UI/Missing/MissingCollection.js => src/UI/Wanted/Missing/MissingCollection.js
rename : src/UI/Missing/MissingLayout.js => src/UI/Wanted/WantedLayout.js
rename : src/UI/Missing/MissingLayoutTemplate.html => src/UI/Wanted/WantedLayoutTemplate.html
extra : source : 2c76f3e423d39446f3bd7799b7344d7be63c70f5
2014-02-22 16:21:40 -08:00

55 lines
1.6 KiB
JavaScript

'use strict';
define(
[
'underscore',
'Series/EpisodeModel',
'backbone.pageable',
'Mixins/AsFilteredCollection',
'Mixins/AsPersistedStateCollection'
], function (_, EpisodeModel, PagableCollection, AsFilteredCollection, AsPersistedStateCollection) {
var collection = PagableCollection.extend({
url : window.NzbDrone.ApiRoot + '/wanted/missing',
model: EpisodeModel,
tableName: 'wanted.missing',
state: {
pageSize : 15,
sortKey : 'airDateUtc',
order : 1
},
queryParams: {
totalPages : null,
totalRecords: null,
pageSize : 'pageSize',
sortKey : 'sortKey',
order : 'sortDir',
directions : {
'-1': 'asc',
'1' : 'desc'
}
},
// Filter Modes
filterModes: {
'monitored' : ['monitored', 'true'],
'unmonitored' : ['monitored', 'false'],
},
parseState: function (resp) {
return {totalRecords: resp.totalRecords};
},
parseRecords: function (resp) {
if (resp) {
return resp.records;
}
return resp;
}
});
collection = AsFilteredCollection.call(collection);
return AsPersistedStateCollection.call(collection);
});