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

24 lines
686 B
JavaScript
Raw Normal View History

2013-06-21 04:43:58 +03:00
'use strict';
define(
[
'backbone',
'AddSeries/Existing/UnmappedFolderModel'
], 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);
}
});
});