mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-03 19:08:20 -04:00
Add new series will clear results and re-focus search box
This commit is contained in:
26
UI/AddSeries/AddSeriesCollection.js
Normal file
26
UI/AddSeries/AddSeriesCollection.js
Normal file
@@ -0,0 +1,26 @@
|
||||
'use strict';
|
||||
define(
|
||||
[
|
||||
'backbone',
|
||||
'Series/SeriesModel'
|
||||
], function (Backbone, SeriesModel) {
|
||||
return Backbone.Collection.extend({
|
||||
url : window.NzbDrone.ApiRoot + '/series/lookup',
|
||||
model: SeriesModel,
|
||||
|
||||
parse: function (response) {
|
||||
|
||||
var self = this;
|
||||
|
||||
_.each(response, function (model) {
|
||||
model.id = undefined;
|
||||
|
||||
if (self.unmappedFolderModel) {
|
||||
model.path = self.unmappedFolderModel.get('folder').path;
|
||||
}
|
||||
});
|
||||
|
||||
return response;
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user