mirror of
https://github.com/lidarr/Lidarr
synced 2024-12-30 19:45:57 +00:00
24 lines
686 B
JavaScript
24 lines
686 B
JavaScript
|
'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);
|
|||
|
}
|
|||
|
});
|
|||
|
});
|