mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-25 22:37:27 -04:00
Manual Import works
Automatically importing still broken
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
var vent = require('../../vent');
|
||||
var NzbDroneCell = require('../../Cells/NzbDroneCell');
|
||||
var SelectMovieLayout = require('../Movie/SelectMovieLayout');
|
||||
|
||||
module.exports = NzbDroneCell.extend({
|
||||
className : 'series-title-cell editable',
|
||||
|
||||
events : {
|
||||
'click' : '_onClick'
|
||||
},
|
||||
|
||||
render : function() {
|
||||
this.$el.empty();
|
||||
|
||||
var movie = this.model.get('movie');
|
||||
|
||||
if (movie)
|
||||
{
|
||||
this.$el.html(movie.title + " (" + movie.year + ")" );
|
||||
}
|
||||
|
||||
this.delegateEvents();
|
||||
return this;
|
||||
},
|
||||
|
||||
_onClick : function () {
|
||||
var view = new SelectMovieLayout();
|
||||
|
||||
this.listenTo(view, 'manualimport:selected:movie', this._setMovie);
|
||||
|
||||
vent.trigger(vent.Commands.OpenModal2Command, view);
|
||||
},
|
||||
|
||||
_setMovie : function (e) {
|
||||
if (this.model.has('movie') && e.model.id === this.model.get('movie').id) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.model.set({
|
||||
movie : e.model.toJSON()
|
||||
});
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user