2013-01-31 22:40:51 +00:00
|
|
|
|
'use strict';
|
2013-05-28 05:40:58 +00:00
|
|
|
|
define(['app'], function () {
|
2013-01-31 22:40:51 +00:00
|
|
|
|
|
|
|
|
|
|
2013-02-14 02:28:56 +00:00
|
|
|
|
NzbDrone.AddSeries.Existing.UnmappedFolderModel = Backbone.Model.extend({
|
|
|
|
|
});
|
2013-01-31 22:40:51 +00:00
|
|
|
|
|
2013-02-14 02:28:56 +00:00
|
|
|
|
NzbDrone.AddSeries.Existing.UnmappedFolderCollection = Backbone.Collection.extend({
|
|
|
|
|
model: NzbDrone.AddSeries.Existing.UnmappedFolderModel,
|
2013-01-31 22:40:51 +00:00
|
|
|
|
|
2013-02-15 02:40:29 +00:00
|
|
|
|
importItems: function (rootFolderModel) {
|
2013-01-31 22:40:51 +00:00
|
|
|
|
|
2013-02-14 02:28:56 +00:00
|
|
|
|
this.reset();
|
2013-04-11 07:52:38 +00:00
|
|
|
|
var rootFolder = rootFolderModel;//.get('path');
|
2013-01-31 22:40:51 +00:00
|
|
|
|
|
2013-02-14 02:28:56 +00:00
|
|
|
|
_.each(rootFolderModel.get('unmappedFolders'), function (folder) {
|
2013-02-15 02:40:29 +00:00
|
|
|
|
this.push(new NzbDrone.AddSeries.Existing.UnmappedFolderModel({ rootFolder: rootFolder, folder: folder}));
|
2013-02-14 02:28:56 +00:00
|
|
|
|
}, this);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|