mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-23 06:45:19 -07:00
Search is now fixed too.
This commit is contained in:
parent
21fa96f78f
commit
15acb9d204
3 changed files with 9 additions and 9 deletions
|
@ -2,7 +2,7 @@ var $ = require('jquery');
|
||||||
var _ = require('underscore');
|
var _ = require('underscore');
|
||||||
var SelectAllCell = require('../../Cells/SelectAllCell');
|
var SelectAllCell = require('../../Cells/SelectAllCell');
|
||||||
var Backgrid = require('backgrid');
|
var Backgrid = require('backgrid');
|
||||||
var MoviesCollection = require('../../Movies/MoviesCollection');
|
var FullMovieCollection = require('../../Movies/FullMovieCollection');
|
||||||
|
|
||||||
module.exports = SelectAllCell.extend({
|
module.exports = SelectAllCell.extend({
|
||||||
_originalRender : SelectAllCell.prototype.render,
|
_originalRender : SelectAllCell.prototype.render,
|
||||||
|
@ -13,7 +13,7 @@ module.exports = SelectAllCell.extend({
|
||||||
this._originalInit.apply(this, arguments);
|
this._originalInit.apply(this, arguments);
|
||||||
|
|
||||||
var tmdbId = this.model.get('tmdbId');
|
var tmdbId = this.model.get('tmdbId');
|
||||||
var existingMovie = MoviesCollection.where({ tmdbId: tmdbId });
|
var existingMovie = FullMovieCollection.where({ tmdbId: tmdbId });
|
||||||
this.isDuplicate = existingMovie.length > 0 ? true : false;
|
this.isDuplicate = existingMovie.length > 0 ? true : false;
|
||||||
|
|
||||||
this.listenTo(this.model, 'change', this._refresh);
|
this.listenTo(this.model, 'change', this._refresh);
|
||||||
|
@ -40,4 +40,4 @@ module.exports = SelectAllCell.extend({
|
||||||
_refresh: function() {
|
_refresh: function() {
|
||||||
this.render();
|
this.render();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
var Marionette = require('marionette');
|
var Marionette = require('marionette');
|
||||||
var SearchResultView = require('./SearchResultView');
|
var SearchResultView = require('./SearchResultView');
|
||||||
var MoviesCollection = require('../Movies/MoviesCollection');
|
var FullMovieCollection = require('../Movies/FullMovieCollection');
|
||||||
var vent = require('vent');
|
var vent = require('vent');
|
||||||
|
|
||||||
module.exports = Marionette.CollectionView.extend({
|
module.exports = Marionette.CollectionView.extend({
|
||||||
|
@ -48,7 +48,7 @@ module.exports = Marionette.CollectionView.extend({
|
||||||
|
|
||||||
appendHtml : function(collectionView, itemView, index) {
|
appendHtml : function(collectionView, itemView, index) {
|
||||||
var tmdbId = itemView.model.get('tmdbId');
|
var tmdbId = itemView.model.get('tmdbId');
|
||||||
var existingMovies = MoviesCollection.where({ tmdbId: tmdbId });
|
var existingMovies = FullMovieCollection.where({ tmdbId: tmdbId });
|
||||||
if(existingMovies.length > 0) {
|
if(existingMovies.length > 0) {
|
||||||
if(this.showExisting) {
|
if(this.showExisting) {
|
||||||
if (index < this.showing || index === 0) {
|
if (index < this.showing || index === 0) {
|
||||||
|
|
|
@ -6,7 +6,7 @@ var Marionette = require('marionette');
|
||||||
var Profiles = require('../Profile/ProfileCollection');
|
var Profiles = require('../Profile/ProfileCollection');
|
||||||
var RootFolders = require('./RootFolders/RootFolderCollection');
|
var RootFolders = require('./RootFolders/RootFolderCollection');
|
||||||
var RootFolderLayout = require('./RootFolders/RootFolderLayout');
|
var RootFolderLayout = require('./RootFolders/RootFolderLayout');
|
||||||
var MoviesCollection = require('../Movies/MoviesCollection');
|
var FullMovieCollection = require('../Movies/FullMovieCollection');
|
||||||
var Config = require('../Config');
|
var Config = require('../Config');
|
||||||
var Messenger = require('../Shared/Messenger');
|
var Messenger = require('../Shared/Messenger');
|
||||||
var AsValidatedView = require('../Mixins/AsValidatedView');
|
var AsValidatedView = require('../Mixins/AsValidatedView');
|
||||||
|
@ -94,7 +94,7 @@ var view = Marionette.ItemView.extend({
|
||||||
|
|
||||||
this.templateFunction = Marionette.TemplateCache.get('AddMovies/MinimumAvailabilityTooltipTemplate');
|
this.templateFunction = Marionette.TemplateCache.get('AddMovies/MinimumAvailabilityTooltipTemplate');
|
||||||
var content1 = this.templateFunction();
|
var content1 = this.templateFunction();
|
||||||
|
|
||||||
this.ui.minimumAvailabilityTooltip.popover({
|
this.ui.minimumAvailabilityTooltip.popover({
|
||||||
content : content1,
|
content : content1,
|
||||||
html :true,
|
html :true,
|
||||||
|
@ -106,7 +106,7 @@ var view = Marionette.ItemView.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
_configureTemplateHelpers : function() {
|
_configureTemplateHelpers : function() {
|
||||||
var existingMovies = MoviesCollection.where({ tmdbId : this.model.get('tmdbId') });
|
var existingMovies = FullMovieCollection.where({ tmdbId : this.model.get('tmdbId') });
|
||||||
if (existingMovies.length > 0) {
|
if (existingMovies.length > 0) {
|
||||||
this.templateHelpers.existing = existingMovies[0].toJSON();
|
this.templateHelpers.existing = existingMovies[0].toJSON();
|
||||||
}
|
}
|
||||||
|
@ -217,7 +217,7 @@ var view = Marionette.ItemView.extend({
|
||||||
});
|
});
|
||||||
|
|
||||||
promise.done(function() {
|
promise.done(function() {
|
||||||
MoviesCollection.add(self.model);
|
FullMovieCollection.add(self.model);
|
||||||
|
|
||||||
self.close();
|
self.close();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue