PDA

View Full Version : New TiVoWeb Module: New Episodes


sanderton
11-16-2003, 02:04 PM
A TiVoWeb module which displays all episodes on a given day or channel which, according to the guide data at least, have never been shown before.

Wrote it as I thought it might flag up some interesting shows that I would otherwise miss.

If you have Sky, be patient!

(Install - just unzip, FTP to the TiVoWeb modules directory and do a Quick Restart)

sanderton
11-16-2003, 05:02 PM
Tweaked to cope better with a busy db.

kitschcamp
11-17-2003, 01:09 AM
Interesting little module, that, I can see myself using this one quite a bit. Thanks very much!

sanderton
11-17-2003, 03:49 AM
Having used it a bit, I think a "whole week by channel" option might be more useful (I would typically scan BBC 2 and C4). I think I'll add that later.

kitschcamp
11-17-2003, 04:24 AM
Yup, I can see that, or "Whole week by favourites", a bit like Mr Tickle's guide checking module.

pahunt
11-17-2003, 12:38 PM
Another nice module. I don't know where you find the time :D

tivo_boj
11-17-2003, 01:15 PM
Stuart - whatever your job is - I want one!

another great module ...where do you get the time?

sanderton
11-17-2003, 02:02 PM
This one took two hours to write from start to finish - it really is easy once you get started!

sanderton
11-17-2003, 03:48 PM
Version 0.2 has the option to view by channela s well as by day.

Trinitron
11-18-2003, 02:23 PM
Is there a simple listing anywhere of links to the various tivoweb modules?

pahunt
11-18-2003, 04:15 PM
Originally posted by Trinitron
Is there a simple listing anywhere of links to the various tivoweb modules?

I wouldn't say it was definitive but this thread (http://www.tivocommunity.com/tivo-vb/showthread.php?s=&threadid=78635) is the best list you will find in one place.

pahunt
11-19-2003, 03:16 PM
Just a small point.

It would be nice if it took account of the current time so that it only showed programs for the current day that haven't started yet.

sanderton
11-19-2003, 05:38 PM
Yeah, I noticed that the other day.

pahunt
11-20-2003, 02:34 AM
I did have a quick look at trying to modify it myself but my TCL knowledge is pretty much non-existant and although I managed to work out how to get the system time I couldn't see how to compare it against the program start time.

Adder
11-20-2003, 04:31 PM
Hmm, by day works, but for by channel I get this for each channel I have tried:

INTERNAL SERVER ERROR
--cut here--
action_shownewepbychan '' 'set "showchan" "706";set "showcall" "C4";'
can't open object (errDbNotFound)

while executing
"db $db openid $fsid"
("uplevel" body line 2)
invoked from within
"uplevel $body"
invoked from within
"transaction {uplevel $body}"
(procedure "RetryTransaction" line 5)
invoked from within
"RetryTransaction {
set stationday [db $db openid $fsid]
set showings [dbobj $stationday get Showing]
set showingfsids [dbobj $stationday g..."
("uplevel" body line 6)
invoked from within
"uplevel $body"
invoked from within
"ForeachMfsFile fsid name type "/Schedule" "" {

scan $name "%d:%d:%d:%d:%d:%d" channel day junk1 junk2 junk3 junk4

if {$channel == $showchan} {
..."
(procedure "::action_shownewepbychan" line 19)
invoked from within
"::action_$action $chan $part $env"
("eval" body line 1)
invoked from within
"eval {::action_$action $chan $part $env}"
--cut here--


Any ideas?

sanderton
11-20-2003, 05:00 PM
"errDbNotFound" means that the datbase connection is broken. TiVoWeb sets that up, so try doing a Full Restart.

Adder
11-20-2003, 05:07 PM
Aha, cheers sanderton, I ended up restarting a couple of times, was trying to add Backup, Re-order Season Passes, the latest version of Endpad, the Digiguide Search 1.4 and New Episodes all at once. ;)

Had to restart to get backup to work, then New Episodes started to work, then crashed tivosh trying to convince endpad that it definately wasn't running. ;)

All seems to be working now though. :D

Wonder_lander
03-18-2004, 09:31 AM
I have had a look at this module and would most use it by day.

What is the sort order because it seems fairly random to me!

It appears to pick a channel number (not sure how) and then puts those programs in time order.

I would be most interested in a global sort by day and then into time order with the option of sorting it globally into Day > Channel Number > Time order!

sanderton
03-18-2004, 09:52 AM
It is the order in which the stations are stored in MFS, which seems to be random.

I guess you could add some sort options, but it sends the HTML for each station as it finds it, so you'd have to store all the data, then sort it.

Feel free to do so and post your code back here!

Wonder_lander
03-18-2004, 09:56 AM
Originally posted by sanderton

Feel free to do so and post your code back here!

:eek: I have no programming background at all...I was hinting at modifications that you could make :D

I don't mind having a stab if someone can point me at some good online guides to this language?

sanderton
03-18-2004, 11:13 AM
I'm happy with how it works no, so I'm not going to make any changes, sorry!

There are many TCL guides out there, but the best all in one package is a book - Jeff Keegan's Hacking Tivo.

gyre
03-18-2004, 01:55 PM
Rather than ordering from amazon.com in the US... anybody know of a UK reseller of this book?

Thanks!

-- gyre --

LJ
04-04-2004, 11:05 AM
Here's a version of 0.2 that only shows new episodes from 7pm until the end of the day. It also sorts the daily list into channel number order and adds a tooltip of the programme description to the episode link. All the procedure names are different to the original so you can happily run both at the same time. Enjoy. :)

threadkiller
04-04-2004, 11:27 AM
LJ Tried your module, but if I use the channel listing, any of the channels in the right hand column bring up a page not found message :( left column is fine tho :)

LJ
04-04-2004, 11:35 AM
Well spotted ! New version in the post above.

Fozzie
04-04-2004, 11:38 AM
Looks good :)

One thing LJ - when finding episodes by date, the channels are sorted slightly out of sequence. Reading from top to bottom displays the 3 digit channels, then the two digit channels then the single digit channels. Each group is sorted numerically ascending though.

LJ
04-04-2004, 11:46 AM
Err, yeah, I almost got the maths right :p Try the latest one and see if that's better...

My excuse is I've only got 3 digit channels to test on :D

Fozzie
04-04-2004, 11:57 AM
hmm - still the same. File timestamp is 1738?

LJ
04-04-2004, 12:01 PM
Oops, forgot to update the zip before posting it! Time for more tea!

Fozzie
04-04-2004, 12:06 PM
That's got it :) (Just finished my tea and toasted tea cake as it happens!)

Snoopy
05-12-2004, 04:58 AM
The error is just here for reference. I either got this error (trying different ui.itcl files that were not necessary), or I got a reboot. See note below as this is now fixed!

INTERNAL SERVER ERROR
--cut here--
action_channelgrid '' 'set "whichChannel" "3521";'
can't open object (0x30007)

while executing
"db $db openid $programfsid"
("uplevel" body line 10)
invoked from within
"uplevel $body"
invoked from within
"transaction {uplevel $body}"
(procedure "RetryTransaction" line 5)
invoked from within
"RetryTransaction {
for { } { $y < $last } { incr y } {

set sl [lindex $scheduleList $y]

set constprogramfsid [lind..."
(procedure "::action_channelgrid" line 148)
invoked from within
"::action_$action $chan $part $env"
("eval" body line 1)
invoked from within
"eval {::action_$action $chan $part $env}"
--cut here—


AHHA -- FIXED! FINALLY ... I hope ;)

BOTTOM LINE: Nothing else is required besides the newepisodes.itcl file.

Here is WHERE I WENT WRONG
1) The message and/or reboot prpoblem has nothing to do with a newer copy of ui.itcl so far as I can tell, even though changing it may cause the message or reboot to surface. Use the ui.itcl that comes with TWP.

2) I removed the wishlist stuff entirely to avoid some conflicts, the specifics of which were unknown at the time, so that still needs to be ironed out. I expect getting it working again should be easy from this stage.

3) Remove the ukgenres.js script and Walla. (ukgenres.js will cause problems if you aren't in the UK -- This was an oversight on my part that caused me major headaches. I believe it comes with the wishslists module and maybe some other things so be aware of it). At least if you are in the US, ukgenres.js doesn't need to be there.

mdolton
11-14-2004, 01:22 AM
Haven't seen this mentioned yet, but this module doesn't work if your channel lineup includes digital channels (ie 10.1, 10.2, etc). The error it returns is:

INTERNAL SERVER ERROR
--cut here--
action_showcir '' ''
expected integer but got "40.1"
while executing
"lsort -integer [array names channeltablenum]"
(procedure "getchannelsir" line 10)
invoked from within
"getchannelsir"
(procedure "::action_showcir" line 4)
invoked from within
"::action_$action $chan $part $env"
("eval" body line 1)
invoked from within
"eval {::action_$action $chan $part $env}"
--cut here--

sanderton
11-14-2004, 03:59 PM
Sorry, what are these "Digital Channels"?

mdolton
11-14-2004, 04:34 PM
Originally posted by sanderton
Sorry, what are these "Digital Channels"?

Sorry, "digital channels" is a bit vague. What I'm reffering to are digital broadcast channels (ATSC in the US). For example, where channel 40 is the old analog NTSC broadcast channel, 40.1 (and perhaps 40.2, 40.3,....) is the new digital ATSC broadcast channel. I'm not even sure why they show up, as directv doesn't offer digital locals in my area, but they're there and it looks like that's what the module is choking on.

sanderton
11-15-2004, 03:30 AM
Sorry, we don't have such things here, so I can't easily see what the problem is or how to fix it.

I guess you could try removing the -integer parameter fron the lsort command listed in the error message?

doubledrat
11-28-2004, 03:25 AM
stuart: good mod!

a couple of suggestions for a FMR ;)

have it able to restrict to a time window. e.g. > 1800 < 0400 ? so we could get rid of all the daytime stuff

what I would REALLY like it to tell me is when there's something completely new on i.e. the first of a new series, or a one off never shown before. not knowing what is in the db I don't know if this is possible or not? where did you get your info on what's in the db?

sanderton
11-28-2004, 03:59 AM
The time windowed version has already been written by LJ.

You clould modify the code to only show episode 1s, but I'm not sure how reliably that would work.

Code's there for anyone to modify. :)

doubledrat
11-28-2004, 04:18 AM
stuart: I'll give it a shot, but I need some info on getting data from the db. is there an online resource at all?

mdolton
11-28-2004, 12:14 PM
Originally posted by sanderton
Sorry, we don't have such things here, so I can't easily see what the problem is or how to fix it.

I guess you could try removing the -integer parameter fron the lsort command listed in the error message?

Yup, getting rid of -integer from the lsort command on line 21 fixed the problem. Thanks!

sanderton
11-29-2004, 04:54 AM
Originally posted by doubledrat
is there an online resource at all?

You're reading it. :)

This, and the Db of Deals is all there is!

Ypu can figure most of it out with the MFS browser in TW, looking at existing code, and guessing!

didolgi
12-28-2004, 04:19 PM
Well I've fallen in love with this module, but I've found a slight problem with it. My TiVo is in Los Angeles, but as we all know the TiVo uses GMT as its internal timeclock, so the schedule data for me shows a "day" as a period of time from 16:00-15:59 the next day. This makes perfect sense because thats midnight-midnight GMT.

Before I start attempting to re-write this code to handle non-UK units I wonder if anybody has already attempted this?

goony
02-24-2005, 07:55 PM
Is this module known to work on a DirecTivo running V4.0.1b? I have installed the module but the results are always empty.

Thanks!

marklyn
09-03-2005, 11:39 AM
This is what I get when I try to run the new episodes module (by chan):
INTERNAL SERVER ERROR
--cut here--
action_showcir '' ''
expected integer but got "18.1"
while executing
"lsort -integer [array names channeltablenum]"
(procedure "getchannelsir" line 10)
invoked from within
"getchannelsir"
(procedure "::action_showcir" line 4)
invoked from within
"::action_$action $chan $part $env"
("eval" body line 1)
invoked from within
"eval {::action_$action $chan $part $env}"
--cut here--

also does similar crash by date:
INTERNAL SERVER ERROR
--cut here--
action_shownewepisodes '' 'set "showdate" "13031";'
expected integer but got "18.1"
while executing
"lsort -integer [array names channeltablenum]"
(procedure "getchannelsir" line 10)
invoked from within
"getchannelsir"
(procedure "::action_shownewepisodes" line 8)
invoked from within
"::action_$action $chan $part $env"
("eval" body line 1)
invoked from within
"eval {::action_$action $chan $part $env}"
--cut here--



I've had my tivo up and running for at least 3 days so it's got a full schedule listing. Any ideas where I've gone wrong?

sanderton
09-04-2005, 04:44 PM
This is someting to do with the way TiVo stors "locals" whatever they might be. We don't have them in the UK.

b166er
01-11-2006, 06:08 PM
Is it possible (and easy) to limit the results of this to be only programs on your favorite channels ?

sanderton
01-12-2006, 03:31 AM
I guess you could write a filter into it.

b166er
01-12-2006, 03:32 AM
I guess you could write a filter into it.Doing it now :cool:

Fred1
01-12-2006, 04:02 AM
Hi

Looks like there are a couple of useful variations on this very nice module from Stuart.

Any chance someone could post a couple of links to the filtered versions (time and channels)

Or even better, a version that integrates it all?

Thanks (hopefully)

b166er
01-12-2006, 06:55 AM
I guess you could write a filter into it.Well, this is my first stab at doing anything in TCL. A TiVoWeb API would have been useful. I never figured out how to tell if a channel is a favourite channel. So instead, I hard-coded my list of personal favourites (only about 20 channels) into the tcl file itself.

It's not an ideal way of doing it obviously. If someone knows how to determine if a channel is a favourite then it would be much better than what I've done. I've marked my changes with #DD. I took LJ's "evening" version as a basis.

It currently limits results to these sky channels:

BBC1NE, BBC2, ITV1TYN, C4, FIVE, SKYONE, SKYTWO, SKY3, UKGLD, UKG2, LIVING, LIVIN2, BBC2, BBC4, ITV2, ITVTHREE, ITV4, PCOM1, PCOM2, E4, MORE4

I deliberately left the +1 channels out of the list.

sanderton
01-12-2006, 07:38 AM
Look in the code for a TiVoWeb module which allows you to filter by favourites. I think TW loads a list at startup.

b166er
01-12-2006, 02:43 PM
Look in the code for a TiVoWeb module which allows you to filter by favourites. I think TW loads a list at startup.Yeah I tried that. The only tivoweb module I could think of is the TWP one that lets you modify your channel preferences (received & favourite). It wasn't obvious what was going on. I think I'll get myself a tivoweb api somehow and not have to rely on someone else's code (which is more difficult being a TCL newbie also).

b166er
01-13-2006, 07:09 AM
Any chance someone could post a couple of links to the filtered versions (time and channels)Ok, here they are. Two versions both modified to filter by favourites. I took the original 0.2 version by stuart and the evening 0.2 version by LJ and added a favourites filter to each of them.

Maybe someone more advanced in TCL/Tivoweb can make a combined version that offers a menu choice for all-day or evening but that's beyond my current knowledge.

Here they are then, I changed the version number to 0.2f (f for favorites)

Fred1
01-13-2006, 09:00 AM
You're a star - thanks

Will take a look at the code myself to see if there is any chance I could contribute (or even learn) something.

LJ
01-13-2006, 10:02 AM
Just noticed this thread's active again... back when it first started I updated my What's On module to highlight new episodes and added a tick box to display only new episodes - it's about half way down this (http://www.ljay.org.uk/tivoweb/tivoweb.html) page. Feel free to grab bits of code.

b166er
01-13-2006, 03:53 PM
Just noticed this thread's active again... back when it first started I updated my What's On module to highlight new episodes and added a tick box to display only new episodes - it's about half way down this (http://www.ljay.org.uk/tivoweb/tivoweb.html) page. Feel free to grab bits of code.
Thanks LJ, I might be pilfering some code from there later :)

marklyn
01-13-2006, 05:12 PM
OK, I'm venturing a guess that either of these two won't work on my tivoweb 1.2.1 because they are written for UK programming/line ups?

When I try to check by channel they fail with:
INTERNAL SERVER ERROR
--cut here--
action_shownewepisodes '' 'set "showdate" "13162";'
expected integer but got "18.1"
while executing
"lsort -integer [array names channeltablenum]"
(procedure "getchannelsir" line 10)
invoked from within
"getchannelsir"
(procedure "::action_shownewepisodes" line 8)
invoked from within
"::action_$action $chan $part $env"
("eval" body line 1)
invoked from within
"eval {::action_$action $chan $part $env}"
--cut here--

b166er
01-13-2006, 05:17 PM
OK, I'm venturing a guess that either of these two won't work on my tivoweb 1.2.1 because they are written for UK programming/line ups?

When I try to check by channel they fail with:
INTERNAL SERVER ERROR
It wasn't specifically written (by Stuart) for UK lineup, but it seems to not like the US style digital channels (e.g. "10.1"). The original 0.2 version will have the same problem and I don't know how to fix it with my limited knowledge at this stage.

Perhaps removing any instance of -integer might do it, but you try it at your own risk. I doubt it has the power to do any real harm if it's a bad idea.

PhilG
03-10-2006, 07:52 AM
I notice that at the very top of the thread, it says "If you have Sky, be patient!" - how patient??

I have installed the script, done a rull restart of Tivoweb but when I select the "by channel" option, all I get is:

Find New Episodes on:

at the top of the screen, and nothing else seems to be happening (so far as I can tell, Explorer is not waiting for anything else from Tivoweb)??

What did I do wrong??

PhilG
03-10-2006, 08:04 AM
The search by day also only seems to return the headings

Also, when I installed this module, Tivowebs "info" module stopped working.

I get:
INTERNAL SERVER ERROR
--cut here--
action_info '/' ''
can't open object (0x00030007)

while executing
"db $db open /Setup"
("uplevel" body line 2)
invoked from within
"uplevel $body"
invoked from within
"transaction {uplevel $body}"
(procedure "RetryTransaction" line 5)
invoked from within
"RetryTransaction {
set setup [db $db open /Setup]
set remoteaddress [dbobj $setup get RemoteAddress]
}"
(procedure "::action_info" line 104)
invoked from within
"::action_$action $chan $part $env"
("eval" body line 1)
invoked from within
"eval {::action_$action $chan $part $env}"
--cut here--

I have removed the "newepisodes.itcl" script from the tivoweb modules directory, done a full restart of Tivoweb now, AND "NEW EPISODES" STILL APPEARS IN THE MENU and Info still doesn't work

HELP!!!!!

sanderton
03-10-2006, 08:24 AM
If it still appears in the menu after removing the file then you either haven't done a fulll restart or your browser is showing a cached copy.

PhilG
03-10-2006, 09:25 AM
Something odd was definately going on. Whilst I was trying to sort this out, Tivo rebooted :(

Trying it all again know (typing with fingers crossed is not easy!)

OK, newepisodes re-FTPd and TivoWeb fully restarted

the 'info' script is now OK, as is 'newepisodes'

Sorry for the faulty fault report

Bobbis2000
07-07-2006, 02:17 PM
When I try to use it, I get this:
INTERNAL SERVER ERROR
--cut here--
action_showcir '' ''
expected integer but got "17.2"
while executing
"lsort -integer [array names channeltablenum]"
(procedure "getchannelsir" line 10)
invoked from within
"getchannelsir"
(procedure "::action_showcir" line 4)
invoked from within
"::action_$action $chan $part $env"
("eval" body line 1)
invoked from within
"eval {::action_$action $chan $part $env}"
--cut here--



Any ideas?
Thanks,
Rob