]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
imdb: fix for the check of the final /
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Wed, 19 Dec 2012 09:04:09 +0000 (10:04 +0100)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Wed, 19 Dec 2012 09:04:09 +0000 (10:04 +0100)
data/rbot/plugins/imdb.rb

index 0df8e2d4433f9d200bc55316e837c24b7d34aeaa..60826299648c3ae2fbf241904ddbbb32e12b2e84 100644 (file)
@@ -133,7 +133,7 @@ class Imdb
     resp = nil
     begin
       # movie urls without tailing / trigger a redirect
-      sr += '/' if sr[-1] != '/'
+      sr += '/' if sr[-1,1] != '/'
       resp = @bot.httputil.get_response(IMDB + sr, :max_redir => -1)
     rescue Exception => e
       error e.message