1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-18 23:48:35 +02:00
Sonarr/src/UI/AddSeries/Existing/UnmappedFolderCollection.js
2013-11-10 20:09:11 -08:00

25 lines
710 B
JavaScript

'use strict';
define(
[
'backbone',
'AddSeries/Existing/UnmappedFolderModel',
'underscore'
], function (Backbone, UnmappedFolderModel,_) {
return Backbone.Collection.extend({
model: UnmappedFolderModel,
importItems: function (rootFolderModel) {
this.reset();
var rootFolder = rootFolderModel;
_.each(rootFolderModel.get('unmappedFolders'), function (folder) {
this.push(new UnmappedFolderModel({
rootFolder: rootFolder,
folder : folder
}));
}, this);
}
});
});