lib/movie-renamer.rb in movie-renamer-0.0.17 vs lib/movie-renamer.rb in movie-renamer-0.0.18
- old
+ new
@@ -41,9 +41,16 @@
open("http://www.imdb.#{$language}/find?q=#{CGI::escape(query)};s=tt")
end
end
end
+ class Movie
+ def director
+ document.at("h4[text()='Director:'] ~ a").innerHTML.strip.imdb_unescape_html rescue nil
+ document.search("h4[text()^='Director'] ~ a").map { |link| link.innerHTML.strip.imdb_unescape_html } rescue []
+ end
+ end
+
end
module MovieRenamer
@newpath = 'tmp'