All pastes #1994866 Raw Edit

TVRage diff

public diff v1 · immutable
#1994866 ·published 2010-11-17 19:27 UTC
rendered paste body
--- project-zs-ng_r2500-v1.2.0/sitebot/plugins/TVRage.tcl       2008-08-28 06:56:33.000000000 -0400+++ TVRage.tcl  2010-11-13 11:01:18.654669701 -0500@@ -338,7 +338,7 @@ proc ::ngBot::TVRage::GetShow {show} {        variable tvrage-       set token [::http::geturl "http://www.tvrage.com/quickinfo.php?show=[::http::formatQuery $show]" -timeout $tvrage(timeout)]+       set token [::http::geturl "http://services.tvrage.com/tools/quickinfo.php?show=[::http::formatQuery $show]" -timeout $tvrage(timeout)]        if {![string equal -nocase [::http::status $token] "ok"]} {                return -code error "Connection [::http::status $token]"@@ -348,6 +348,8 @@        ## redirected on the server to an 'Unknown Page' error page.        set data [::http::data $token]+       regsub -lineanchor -nocase {\@$} $data {@0\n} data+       regsub -lineanchor -nocase {<pre>} $data "" data        set matches [regexp -inline -nocase -all -- {(.[^@]+)@(.[^\n\r]+)(?:[\n\r]*)} $data]        if {[string length $matches] == 0} {@@ -401,7 +403,9 @@        set data [::http::data $token]-       regexp -- {<font size=.?4.?>Season (\d+)</font>} $data -> tmp_season+        if {[regexp -- {<font size=.?4.?>Season (\d+)</font>} $data -> tmp_season]} {+        } elseif {[regexp -- {<font size=.?4.?>Series (\d+)</font>} $data -> tmp_season]} {+        } else { error "Invalid season formatting. Website might have changed layout." }        if {[string trimleft $season "0"] != $tmp_season} {                error "Invalid season information. Website returned season $tmp_season, we were expecting $season"