diff --git a/plugins/imdb.py b/plugins/imdb.py index 53a8fe2..83e96e2 100644 --- a/plugins/imdb.py +++ b/plugins/imdb.py @@ -14,8 +14,12 @@ def imdb(inp): elif content['Response'] == 'True': content['URL'] = 'http://www.imdb.com/title/%(ID)s' % content - return "\x02%(Title)s\x02 (%(Year)s) (%(Genre)s): %(Plot)s " \ - "\x02%(Runtime)s\x02. \x02%(Rating)s/10\x02 with " \ - "\x02%(Votes)s\x02 votes. %(URL)s" % content + out = '\x02%(Title)s\x02 (%(Year)s) (%(Genre)s): %(Plot)s' + if content['Runtime'] != 'N/A': + out += ' \x02%(Runtime)s\x02.' + if content['Rating'] != 'N/A' and content['Votes'] != 'N/A': + out += ' \x02%(Rating)s/10\x02 with \x02%(Votes)s\x02 votes.' + out += ' %(URL)s' + return out % content else: return 'unknown error' diff --git a/plugins/rottentomatoes.py b/plugins/rottentomatoes.py index 5e20c43..bbac607 100644 --- a/plugins/rottentomatoes.py +++ b/plugins/rottentomatoes.py @@ -7,6 +7,7 @@ movie_reviews_url = api_root+'movies/%s/reviews.json?apikey=%s&review_type=all' response = u"%s - critics: \x02%d%%\x02 (%d\u2191%d\u2193) audience: \x02%d%%\x02 - %s" + @hook.command('rt') def rottentomatoes(inp, bot=None): '.rt