mirror of
https://github.com/Radarr/Radarr
synced 2025-01-18 21:52:10 +00:00
New: Manual search shows error when download fails
This commit is contained in:
parent
6b9c4af591
commit
b34879b4f6
1 changed files with 10 additions and 2 deletions
|
@ -14,15 +14,23 @@ module.exports = Backgrid.Cell.extend({
|
||||||
|
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
this.$el.html('<i class="icon-sonarr-spinner fa-spin" />');
|
this.$el.html('<i class="icon-sonarr-spinner fa-spin" title="Adding to download queue" />');
|
||||||
|
|
||||||
//Using success callback instead of promise so it
|
//Using success callback instead of promise so it
|
||||||
//gets called before the sync event is triggered
|
//gets called before the sync event is triggered
|
||||||
this.model.save(null, {
|
var promise = this.model.save(null, {
|
||||||
success : function() {
|
success : function() {
|
||||||
self.model.set('queued', true);
|
self.model.set('queued', true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
promise.fail(function (xhr) {
|
||||||
|
if (xhr.responseJSON && xhr.responseJSON.message) {
|
||||||
|
self.$el.html('<i class="icon-sonarr-download-failed" title="{0}" />'.format(xhr.responseJSON.message));
|
||||||
|
} else {
|
||||||
|
self.$el.html('<i class="icon-sonarr-download-failed" title="Failed to add to download queue" />');
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
render : function() {
|
render : function() {
|
||||||
|
|
Loading…
Reference in a new issue