Made imdb handle people properly.

This commit is contained in:
Jeremy Fincher 2003-08-23 08:52:42 +00:00
parent f35da83b1b
commit 320f1d26b7

View File

@ -66,12 +66,17 @@ class IMDB(callbacks.Privmsg):
irc.reply(msg, 'No movies matched that title.') irc.reply(msg, 'No movies matched that title.')
elif len(movies) == 1: elif len(movies) == 1:
movie = movies[0] movie = movies[0]
title = utils.unCommaThe(movie.title()) if 'Name?' in movie.url:
genres = utils.commaAndify(map(str.lower, movie.genres())) s = '"%s" is apparently a person. ' \
s = '"%s" (%s) belongs to the %s genres. ' \ 'More information is available at <%s>' % \
'It\'s been rated %s out of 10. ' \ (movie.title(), movie.url)
'More information is available at <%s>' % \ else:
(title, movie.year(), genres, movie.rating(), movie.url) title = utils.unCommaThe(movie.title())
genres = utils.commaAndify(map(str.lower, movie.genres()))
s = '"%s" (%s) belongs to the %s genres. ' \
'It\'s been rated %s out of 10. ' \
'More information is available at <%s>' % \
(title, movie.year(), genres, movie.rating(), movie.url)
irc.reply(msg, s) irc.reply(msg, s)
elif len(movies) > 20: elif len(movies) > 20:
s = 'More than 20 movies matched, please narrow your search.' s = 'More than 20 movies matched, please narrow your search.'