Subject: | user_rating on movies "awaiting 5 votes" |
If a movie does not have enough votes to have a user rating the the user_rating method returns "Credited cast". The following title (currently) has less than 5 votes and displays this behavior:
http://www.imdb.com/title/tt0398103/
Adding the following line to the _user_rating subroutine solves this problem.
my ($rating) = split('\/',$parser->get_text,2);
+ $rating = undef if $rating =~ /cast/;
return $rating;