mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-13 16:43:58 -07:00
signalr cleanup
This commit is contained in:
parent
feda4a9b67
commit
25e2c98c45
219 changed files with 2035 additions and 1495 deletions
|
@ -4,5 +4,30 @@ define(
|
|||
'backbone'
|
||||
], function (Backbone) {
|
||||
return Backbone.Model.extend({
|
||||
url: window.ApiRoot + '/command',
|
||||
|
||||
parse: function (response) {
|
||||
response.name = response.name.toLocaleLowerCase();
|
||||
return response;
|
||||
},
|
||||
|
||||
isActive: function () {
|
||||
return this.get('state') !== 'completed' && this.get('state') !== 'failed';
|
||||
},
|
||||
|
||||
isSameCommand: function (command) {
|
||||
|
||||
if (command.name.toLocaleLowerCase() != this.get('name').toLocaleLowerCase()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (var key in command) {
|
||||
if (key !== 'name' && command[key] !== this.get(key)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue