Skip to content
This repository has been archived by the owner on Jul 28, 2020. It is now read-only.

Commit

Permalink
fixed movie fetcher when movie was not found on imdb
Browse files Browse the repository at this point in the history
  • Loading branch information
pbek committed Dec 19, 2014
1 parent e0eee4b commit e2bdbf4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/tasks/movies.rake
Expand Up @@ -66,6 +66,8 @@ namespace :movies do
choice = "" choice = ""
end end


next if imdb_movies.size == 0

# even search a 2nd time if we already have the movie so we get the right language # 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) 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? next if imdb_movie.nil? || imdb_movie.title.nil?
Expand Down

0 comments on commit e2bdbf4

Please sign in to comment.