Radarr/src/UI/Cells/EpisodeActionsCell.js
Leonardo Galli 0b278c7db8 Searching for movie now works with downloading. They also get imported fine.
Additionally, a whole series (or movie in this case) can now be
downloaded manually.
Note: It probably won't start downloading missed releases. Only manually
clicking search for is working ATM.
2016-12-28 17:13:18 +01:00

45 lines
1.3 KiB
JavaScript

var vent = require('vent');
var NzbDroneCell = require('./NzbDroneCell');
var CommandController = require('../Commands/CommandController');
module.exports = NzbDroneCell.extend({
className : 'episode-actions-cell',
events : {
'click .x-automatic-search' : '_automaticSearch',
'click .x-manual-search' : '_manualSearch'
},
render : function() {
this.$el.empty();
this.$el.html('<i class="icon-sonarr-search x-automatic-search" title="Automatic Search"></i>' + '<i class="icon-sonarr-search-manual x-manual-search" title="Manual Search"></i>');
CommandController.bindToCommand({
element : this.$el.find('.x-automatic-search'),
command : {
name : 'episodeSearch',
episodeIds : [this.model.get('id')]
}
});
this.delegateEvents();
return this;
},
_automaticSearch : function() {
CommandController.Execute('episodeSearch', {
name : 'episodeSearch',
episodeIds : [this.model.get('id')]
});
},
_manualSearch : function() {
console.warn(this.cellValue);
vent.trigger(vent.Commands.ShowEpisodeDetails, {
episode : this.cellValue,
hideSeriesLink : true,
openingTab : 'search'
});
}
});