mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-28 04:51:45 +02:00
moved most of addseries to use require.js
This commit is contained in:
@@ -1,34 +1,35 @@
|
||||
'use strict';
|
||||
/// <reference path="../../app.js" />
|
||||
NzbDrone.AddSeries.Existing.UnmappedFolderModel = Backbone.Model.extend({
|
||||
|
||||
define(['app'], function () {
|
||||
|
||||
|
||||
});
|
||||
|
||||
NzbDrone.AddSeries.Existing.UnmappedFolderCollection = Backbone.Collection.extend({
|
||||
model: NzbDrone.AddSeries.Existing.UnmappedFolderModel,
|
||||
NzbDrone.AddSeries.Existing.UnmappedFolderModel = Backbone.Model.extend({
|
||||
|
||||
|
||||
importItems: function (rootFolderModel, quality) {
|
||||
});
|
||||
|
||||
if (!rootFolderModel) {
|
||||
throw "folder array is required";
|
||||
NzbDrone.AddSeries.Existing.UnmappedFolderCollection = Backbone.Collection.extend({
|
||||
model: NzbDrone.AddSeries.Existing.UnmappedFolderModel,
|
||||
|
||||
|
||||
importItems: function (rootFolderModel, quality) {
|
||||
|
||||
if (!rootFolderModel) {
|
||||
throw "folder array is required";
|
||||
}
|
||||
|
||||
if (!quality) {
|
||||
throw "quality is required";
|
||||
}
|
||||
|
||||
this.reset();
|
||||
|
||||
var qualityCollection = quality;
|
||||
var rootFolder = rootFolderModel.get('path');
|
||||
|
||||
_.each(rootFolderModel.get('unmappedFolders'), function (folder) {
|
||||
this.push(new NzbDrone.AddSeries.Existing.UnmappedFolderModel({ rootFolder: rootFolder, folder: folder, quality: qualityCollection }));
|
||||
}, this);
|
||||
}
|
||||
|
||||
if (!quality) {
|
||||
throw "quality is required";
|
||||
}
|
||||
|
||||
this.reset();
|
||||
|
||||
var qualityCollection = quality;
|
||||
var rootFolder = rootFolderModel.get('path');
|
||||
|
||||
_.each(rootFolderModel.get('unmappedFolders'), function (folder) {
|
||||
this.push(new NzbDrone.AddSeries.Existing.UnmappedFolderModel({rootFolder:rootFolder, folder: folder, quality: qualityCollection }));
|
||||
}, this);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user