This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

TVRage.com Schedule Script (Latest: 2.0)

Support & discussion of released scripts, and announcements of new releases.
Post Reply
[
[Lost]
Voice
Posts: 9
Joined: Tue Oct 10, 2006 1:59 am

Post by [Lost] »

ok with you again now.lol
i have this after i do !today Gb
Currently: can't read "state(after)": no such element in array
Currently: while executing
Currently: "after cancel $state(after)"
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Read this post: http://forum.egghelp.org/viewtopic.php?t=12535

It's a non fatal error message and is not stopping the script from functioning.
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

Lost:

If I'm not mistaken, your error is because you're getting a timeout for the geturl function. I don't know if the tvrage script gives an option for setting the timeout, but if it does, you might try making it longer (I generally use 30000 ms (30 seconds)) So, look at the script and see if it has a timeout for the geturl. If it does not have a timeout option, add one like this:

Code: Select all

catch {set page [::http::geturl $url -timeout 30000]} error
The $url var in the example above is whatever the script uses for the url string.

I'd suggest the author add a timeout option in the config section of the script as well, and actually catch the timeouts and give an error msg. I use something like this:

Code: Select all

set myurltimeout 30000

proc myproc {nick uhost hand chan text} {
        global myurltimeout
        set url "http://whatever"

        catch {set page [::http::geturl $url -timeout $myurltimeout]} error
        if {[string match -nocase "*couldn't open socket*" $error]} {
                puthelp "PRIVMSG $nick :$url error: couldn't connect..Try again later"
                ::http::cleanup $page
                return
        }
        if {[::http::status $page] == "timeout" } {
                puthelp "PRIVMSG $nick :$url error: Connection timed out. Try again."
                ::http::cleanup $page
                return
        }
        set html [::http::data $page]
        ::http::cleanup $page
}
##########################################################################################
(Note, I just looked at the script posted in this thread, and it does not provide any catches/error handling or timeout. The geturl part is a bit complicated so I'll leave it to the author to work in the catches, error-handling and timeouts :)
d
davidp
Voice
Posts: 6
Joined: Mon Oct 09, 2006 10:03 pm

Post by davidp »

Can anyone help me with my error?
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

davidp wrote: Tcl error [pub:tvrage.com.today]: couldn't open socket: connection timed out
Same problem.. Read my reply to 'Lost' about setting a higher timeout.
[
[Lost]
Voice
Posts: 9
Joined: Tue Oct 10, 2006 1:59 am

Post by [Lost] »

rosc2112


thanx alot for the explanation bro:)
G
GaveUp
Op
Posts: 139
Joined: Thu Jan 19, 2006 3:56 am

Post by GaveUp »

Ok here's 1.0 RC1. There are some rather extensive changes to this release (far more than intially planned). There is no a !yesterday trigger and schedules are cached (reduce number of times information is pulled from tvrage). There was a fair amount of code cleanup and reorganization and will be more before 1.0. Due to some design changes dict support is now required for this script. You can check the Tcl Wiki for information on setting up dict support on Tcl 8.4. A note for all the people that will post and whine about not having dict support, being unable to read instructions on how to install it, or <insert annoying child whine here> ... I don't care. If you don't like where this script is going or what it has become then code your own. Complain here and you'll likely just see this script just become unmaintained even faster than would otherwise happen. If you think that's harsh, oh well. Having read other threads here where people have faced similar issues I have seen the whining and aim to stop it before it starts, though, keep in mind I have no problem with legitimate questions and problems needing answers.

The last order of business. 1.0 will likely be the last version of this script, not because there is nothing more to do with this script, but do to unavoidable circumstances that will make it impossible for me to continue development on this script. If there is anyone that has interest in working on the script or maintaining their own private copy I will gladly field questions about the code design and the like for as long as I can. Please, though, use PM for those inquiries and lets keep this thread directly related to issues with using the script.

Without further ado, here is the complete changelog and link to script.

1.0 RC1
-------
+Added existance checking to templating. See default.theme
for examples and documentation.
+Added support for caching schedules. Cache is updated
daily or can be updated manually.
+Reorganized schedule code to make it more maintainable.
This change requires dict support. See
http://wiki.tcl.tk/5042 for information on setting up
dict support for Tcl 8.4.
-Removed ncgi code/option. It was unneeded.
+Added support for showing the previous day's schedule.
*Updated summary retrieval code to deal with changes to
tvrage.com layout.
*Redid code for retrieving show and episode information.
All information that may be added in the future as well as
currently exists should be supported. Some template
triggers have changed as a result. General formula for
most triggers:
{%%trait_in_lower_case_with_underscores_instead_of_spaces%%}
*Fixed bug of only schedule header displaying in the event
there was no schedule information for a given date.


Grab TVRage 1.0 RC1 here.
a
aha
Voice
Posts: 5
Joined: Wed Nov 01, 2006 10:05 am

Post by aha »

question :

i dont get the title to display on !showinfo
Title :: <> Premiered :: 2005 <> Latest Episode :: 02x09 - Unearthed (Oct/30/2006) <> Next Episode :: 02x10 - Rendezvous (Nov/6/2006) <> Country :: USA <> Status :: Returning Series <> Genre :: Action | Adventure | Drama

This is the code :

set tvrage(showInfoLine) "PRIVMSG {%%chan%%} :\002\0031Title\002 :: {%%title%%} <> \002Premiered\002 :: {%%premiered%%} <> {%%latest%%} <> {%%next%%} <> \002Country\002 :: {%%country%%} <> \002Status\002 :: {%%status%%} <> \002Genre\002 :: {%%genres%%}"

in the default theme i also dont see a var called %%title%% so thats prolly it.
%%EpTitle%% is only for summary.
im using tvrage 1.0.9 ( didnt install RC1 yet due to dict installation needed :)

Thnx in advance for any help!
G
GaveUp
Op
Posts: 139
Joined: Thu Jan 19, 2006 3:56 am

Post by GaveUp »

compare it to the default theme. title has become show_name.
a
aha
Voice
Posts: 5
Joined: Wed Nov 01, 2006 10:05 am

Post by aha »

GaveUp wrote:compare it to the default theme. title has become show_name.
well default was %%title%%
%%show_name%% doesnt work either :)

Title :: {%%show_name%%} <> Premiered :: 2005 <>
any other suggestions ?
G
GaveUp
Op
Posts: 139
Joined: Thu Jan 19, 2006 3:56 am

Post by GaveUp »

What version are you running? That sounds like a bug that was in 0.9 and fixed in 0.9.1
a
aha
Voice
Posts: 5
Joined: Wed Nov 01, 2006 10:05 am

Post by aha »

GaveUp wrote:What version are you running? That sounds like a bug that was in 0.9 and fixed in 0.9.1
well i downloaded 0.9.1
but tvrage.tcl says is 0.9 so that might be it.
TO upgrade a change of only the tvrage.tcl is enough ?
G
GaveUp
Op
Posts: 139
Joined: Thu Jan 19, 2006 3:56 am

Post by GaveUp »

for .9 to .9.1 I believe that is sufficient. To goto 1.0 RC1, it is not.
a
aha
Voice
Posts: 5
Joined: Wed Nov 01, 2006 10:05 am

Post by aha »

GaveUp wrote:for .9 to .9.1 I believe that is sufficient. To goto 1.0 RC1, it is not.
yeah it worx now ;)
my bad.. I probably downloaded .9 :(

i have 1 more question.
if i do !ep prison break on some irc chan i get this :
Prison Break - Scripted, US - ( http://www.tvrage.com/Prison_Break ) - The latest episode 02x09, Unearthed, aired @ Oct 30 2006, the next episode 02x10, Rendezvous, will air @ Nov 6 2006

I want that "Scripted" too in my line. how do i "add" this myself ?
G
GaveUp
Op
Posts: 139
Joined: Thu Jan 19, 2006 3:56 am

Post by GaveUp »

{%%class%%} MAY work, but I believe the support for classification was broken in .9/.9.1. It is working in 1.0 RC1.
Post Reply