mirror of
https://github.com/Radarr/Radarr
synced 2025-02-26 16:13:19 +00:00
Fixes some issues when adding movies caused by TMDB.
This commit is contained in:
parent
e68653463d
commit
402a9e1ee0
4 changed files with 5 additions and 4 deletions
|
@ -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;
|
||||
|
|
|
@ -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…
Reference in a new issue