mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-20 21:54:25 -04:00
New: Drone now uses the Download Client API to determine if a download is ready for import. (User configuration is required to replace the drone factory with this feature)
This commit is contained in:
@@ -1,12 +1,31 @@
|
||||
'use strict';
|
||||
define(
|
||||
[
|
||||
'backbone',
|
||||
'Settings/DownloadClient/DownloadClientModel'
|
||||
], function (Backbone, DownloadClientModel) {
|
||||
|
||||
return Backbone.Collection.extend({
|
||||
model: DownloadClientModel,
|
||||
url : window.NzbDrone.ApiRoot + '/downloadclient'
|
||||
});
|
||||
define([
|
||||
'backbone',
|
||||
'Settings/DownloadClient/DownloadClientModel'
|
||||
], function (Backbone, DownloadClientModel) {
|
||||
|
||||
return Backbone.Collection.extend({
|
||||
model: DownloadClientModel,
|
||||
url : window.NzbDrone.ApiRoot + '/downloadclient',
|
||||
|
||||
comparator : function(left, right, collection) {
|
||||
|
||||
var result = 0;
|
||||
|
||||
if (left.get('protocol')) {
|
||||
result = -left.get('protocol').localeCompare(right.get('protocol'));
|
||||
}
|
||||
|
||||
if (result === 0 && left.get('name')) {
|
||||
result = left.get('name').localeCompare(right.get('name'));
|
||||
}
|
||||
|
||||
if (result === 0) {
|
||||
result = left.get('implementation').localeCompare(right.get('implementation'));
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user