1
0
Fork 0
mirror of https://github.com/Radarr/Radarr synced 2025-02-26 08:02:56 +00:00

Fixes some issues when adding movies caused by TMDB.

This commit is contained in:
Leonardo Galli 2017-01-04 20:52:59 +01:00
parent e68653463d
commit 402a9e1ee0
4 changed files with 5 additions and 4 deletions

View file

@ -246,6 +246,7 @@ public List<Movie> SearchForNewMovie(string title)
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;

View file

@ -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();

View file

@ -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) {

View file

@ -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();