1
0
Fork 0
mirror of https://github.com/Sonarr/Sonarr synced 2025-01-01 12:45:03 +00:00
Sonarr/UI/AddSeries/Collection.js
2013-09-17 22:50:32 -07:00

26 lines
677 B
JavaScript

'use strict';
define(
[
'backbone',
'Series/SeriesModel'
], function (Backbone, SeriesModel) {
return Backbone.Collection.extend({
url : window.NzbDrone.ApiRoot + '/series/lookup',
model: SeriesModel,
parse: function (response) {
var self = this;
_.each(response, function (model) {
model.id = undefined;
if (self.unmappedFolderModel) {
model.path = self.unmappedFolderModel.get('folder').path;
}
});
return response;
}
});
});