summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-04-07 12:05:10 +0000
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-04-07 12:05:10 +0000
commita8c88dac4ec094b7b40ee622239d09742d6064be (patch)
tree1ba678d6825a77b5dd776884fccaf3d0aa665a50 /data
parentd4848b41b48569a2fd4f1c96a30b9fce889deb2e (diff)
imdb plugin: TV series are not shown by default when looking for movies by person/year, but they can be enabled with the imdb.tv_series_in_movies option
Diffstat (limited to 'data')
-rw-r--r--data/rbot/plugins/imdb.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/data/rbot/plugins/imdb.rb b/data/rbot/plugins/imdb.rb
index ee6b59fe..b969ba96 100644
--- a/data/rbot/plugins/imdb.rb
+++ b/data/rbot/plugins/imdb.rb
@@ -286,6 +286,9 @@ class Imdb
(aclip == quot ? 1 : -1) <=> (bclip == quot ? 1 : -1)
}.each { |url, pre_title, pre_roles|
title = fix_article(pre_title.ircify_html)
+ if title[0] == ?" and not @bot.config['imdb.tv_series_in_movies']
+ next
+ end
role_array = []
pre_roles.strip.scan(/\[([^\]]+)\]((?:\s+\([^\[]+\))+)?/) { |txt, comm|
if txt.match(/^(.*)\s+\.\.\.\.\s+(.*)$/)
@@ -323,6 +326,9 @@ class ImdbPlugin < Plugin
BotConfig.register BotConfigBooleanValue.new('imdb.fix_article',
:default => false,
:desc => "Try to detect an article placed at the end and move it in front of the title")
+ BotConfig.register BotConfigBooleanValue.new('imdb.tv_series_in_movies',
+ :default => false,
+ :desc => "Whether searching movies by person/year should also return TV series")
def help(plugin, topic="")
"imdb <string> => search http://www.imdb.org for <string>: prefix <string> with 'name' or 'title' if you only want to search for people or films respectively, e.g.: imdb name ed wood"