Skip to content
Permalink
Browse files

fixed movie fetcher when movie was not found on imdb

  • Loading branch information...
pbek committed Dec 19, 2014
1 parent e0eee4b commit e2bdbf4135fab5e6f4f2721b611b403dc25d31d6
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/tasks/movies.rake
@@ -66,6 +66,8 @@ namespace :movies do
choice = ""
end

next if imdb_movies.size == 0

# even search a 2nd time if we already have the movie so we get the right language
imdb_movie = (choice.size > 1) ? Imdb::Movie.new(choice) : Imdb::Movie.new(imdb_movies[choice.to_i].id)
next if imdb_movie.nil? || imdb_movie.title.nil?

0 comments on commit e2bdbf4

Please sign in to comment.
You can’t perform that action at this time.