mirror of
https://github.com/fergalmoran/Readarr.git
synced 2026-03-06 05:36:12 +00:00
New: Manual Import episodes
This commit is contained in:
@@ -11,9 +11,9 @@ module.exports = TemplatedCell.extend({
|
||||
className : 'queue-actions-cell',
|
||||
|
||||
events : {
|
||||
'click .x-remove' : '_remove',
|
||||
'click .x-import' : '_import',
|
||||
'click .x-grab' : '_grab'
|
||||
'click .x-remove' : '_remove',
|
||||
'click .x-manual-import' : '_manualImport',
|
||||
'click .x-grab' : '_grab'
|
||||
},
|
||||
|
||||
ui : {
|
||||
@@ -30,21 +30,12 @@ module.exports = TemplatedCell.extend({
|
||||
}));
|
||||
},
|
||||
|
||||
_import : function() {
|
||||
var self = this;
|
||||
|
||||
var promise = $.ajax({
|
||||
url : window.NzbDrone.ApiRoot + '/queue/import',
|
||||
type : 'POST',
|
||||
data : JSON.stringify(this.model.toJSON())
|
||||
});
|
||||
|
||||
this.$(this.ui.import).spinForPromise(promise);
|
||||
|
||||
promise.success(function() {
|
||||
//find models that have the same series id and episode ids and remove them
|
||||
self.model.trigger('destroy', self.model);
|
||||
});
|
||||
_manualImport : function () {
|
||||
vent.trigger(vent.Commands.ShowManualImport,
|
||||
{
|
||||
downloadId: this.model.get('downloadId'),
|
||||
title: this.model.get('title')
|
||||
});
|
||||
},
|
||||
|
||||
_grab : function() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{{#if_eq status compare="Completed"}}
|
||||
{{#if_eq trackedDownloadStatus compare="Warning"}}
|
||||
<i class="icon-sonarr-import x-import" title="Force import"></i>
|
||||
<i class="icon-sonarr-import-manual x-manual-import" title="Manual import"></i>
|
||||
{{/if_eq}}
|
||||
{{/if_eq}}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user