Fixes some issues when adding movies caused by TMDB.

pull/2/head
Leonardo Galli 8 years ago
parent e68653463d
commit 402a9e1ee0

@ -246,6 +246,7 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
imdbMovie.TitleSlug = titleSlug.ToLower().Replace(" ", "-");
imdbMovie.Year = DateTime.Parse(result.release_date).Year;
imdbMovie.Images = new List<MediaCover.MediaCover>();
imdbMovie.Overview = result.overview;
try
{
string url = result.poster_path;

@ -125,7 +125,7 @@ module.exports = Marionette.Layout.extend({
}
else if (!this.isExisting) {
this.resultCollectionView.setExisting(options.movie.get('imdbId'))
this.resultCollectionView.setExisting(options.movie.get('tmdbId'))
/*this.collection.term = '';
this.collection.reset();
this._clearResults();

@ -21,8 +21,8 @@ module.exports = Marionette.CollectionView.extend({
return this.showing >= this.collection.length;
},
setExisting : function(imdbid) {
var movies = this.collection.where({ imdbId : imdbid });
setExisting : function(tmdbid) {
var movies = this.collection.where({ tmdbId : tmdbid });
console.warn(movies)
//debugger;
if (movies.length > 0) {

@ -91,7 +91,7 @@ var view = Marionette.ItemView.extend({
},
_configureTemplateHelpers : function() {
var existingMovies = MoviesCollection.where({ imdbId : this.model.get('imdbId') });
var existingMovies = MoviesCollection.where({ tmdbId : this.model.get('tmdbId') });
console.log(existingMovies)
if (existingMovies.length > 0) {
this.templateHelpers.existing = existingMovies[0].toJSON();

Loading…
Cancel
Save