# New tivoweb module beta: Movie-Search.



## CptanPanic

Intro:
I wrote this program, because it is hard to see what movies are coming up on the tivo. This program allows you to easily browse upcoming movies for your tivo. Allows you to browse by Category, premiere, keyword all movies that are playing on the movie channels of your choice. Used as a complement to the standard search module on tivoweb where you can search for specific shows, this you can browse entire listings. Comes as a 2 part process, a command-line process that parses the GuideData for movies, and the tivoweb module. I run it via cron once a night.

Post below if it works for you and what you think.
CptanPanic.

Get it Here


----------



## CptanPanic

Until the next version of tivoweb comes out, I have a fix for the conflict detection part so it will ignore the suggested todo's. It is available on my website. sched.itcl just over-write the current on in your modules.
Cp


----------



## CptanPanic

Ok next tivoweb version is out. So you don't need sched.itcl from me.


----------



## whackit

Hi.

Thanks for your script! it is a much needed addition to tivo web. I'm having some problems getting it all going. Have tried a couple of different installs. I seem to be following your instructions correctly yet whenever I run moviesort.tcl I get the following:


Initializing Movie Channels

Processing Guide Data ...
Found 0 of Movies in 48 seconds

The End


I believe I am doing everything correctly. Everything is in the right place and paths and permissions set. I have set a lot of channels in the configuration file



set preffered _channels {a lot of channels here all accurate based on guide info}



What am I doing wrong? it is running on a d-tivo 2.5.2 w/ tivoweb 1.9.4b4.
I have set some of my locals in the search for documentaries etc they are all two digits... could this be it?

Thanks in advance.

Just checked by removing locals... It's not that.


----------



## CptanPanic

Ok I have found the problem. In DirectTivo the code for Movie catagory is different. I will update prog to fix this and will let you know.
Brian


----------



## whackit

Great. While you're at it... Is there a way to include the audio/video options in the search? I often look for all the movies that are letterboxed, or dolby etc.

Thanks. Will let you know how the dtivo version works. 

Again, much thanks for the work.


----------



## mrtickle

Are there any UK users testing this, is sounds great? If so please say. Otherwise I'll give it a try sometime later in the week


----------



## CptanPanic

Ok I put up a new version (0.9) that hopefully works on directivos. If someone could test it that would be great. file is in the same place.
CP


----------



## whackit

Sorry to be the bearer of bad news...

Loaded everything up again, same result.

Initializing Movie Channels

Processing Guide Data ... 
Found 0 of Movies in 46 seconds

The End 


I wish I could be more helpful... the best I can offer is testing on the Dtivo for you. Will be out of town for a week but can help again then.

Thanks again.


----------



## CptanPanic

Actually The problem was in the packaging. The one you tried was actually the old version. Sorry, but re-download and try again.
CP


----------



## whackit

Okay some progress...

Now I get this:

Initializing Movie Channels
Initialized 54 Channels

Processing Guide Data ...
no such object: 
while executing
"dbobj $showing get Time"
("uplevel" body line 30)
invoked from within
"uplevel $body"
invoked from within
"transaction {uplevel $body}"
(procedure "RetryTransaction" line 5)
invoked from within
"RetryTransaction {
set schedlist [get_fsidbyprefix "/Schedule" "$stationfsid:$date:"]
set stationdayfsid [lindex [get_fsidbyprefix "/Sched..."
("foreach" body line 13)
invoked from within
"foreach slist $slists {
set stars 0
set premier 0
set date 0
set showing ""
set seconds [lindex $slist 0]
set stationfsid [lindex $slist 1..."
(file "./moviesort.tcl" line 147)


Then when I run the module it tells me i need to run standalone moviesort.tcl.

Any other suggestions? If you get me tonight or tom am I can try before I leave.

Thanks again.


----------



## CptanPanic

I will look at it tonight. Its a pain since I don't have a Dtivo to test it out. I might have to give you a debug version to see what's going on, but maybe I can find something.
CP


----------



## whackit

Okay... I'm gone until next Sunday so don't sweat it. 

Cheers.


----------



## deebo

I've noticed a wierd bug. If I go to the movie search module and say i just want to look through the movies so I select "title keyword" and search for: I just put an "a" it brings up a list and a 1-25 and a next button. If I click on next or 2 it says "Did you forget to enter something to search for?" and goes to url

http://tivo/moviesearch?searchby=1&scat=0&stars=0&premiere=0&sort=0&lastsort=0&start=50

if I change the url to
http://tivo/moviesearch?searchby=2&scat=0&stars=0&premiere=0&sort=0&lastsort=0&start=50

it works fine and I can view all the 1-25 screens.
-David


----------



## CptanPanic

I will check out the bug when I get home. But if you are wanting to just browse all the movies you don't have to change any of the default settings, just hit submit. And it will bring up all the movies, similarly if you want to see all the premieres, just click the priemieres and click submit. 
CP


----------



## devnull

I have a DTivo and have been seeing the same problems that have been reported when running moviesort.tcl.



Code:


    ("foreach" body line 13)
    invoked from within
"foreach slist $slists {
                set stars 0
                set premier 0
                set date 0
                set showing ""
                set seconds [lindex $slist 0]
                set stationfsid [lindex $slist 1..."
    (file "./moviesort.tcl" line 147)

I was getting this with a channel list of that included a few of my locals and HBO (501-504). I was too lazy to go find the whole list  .

Anyway, I can't remember why, but I restarted it with just a few locals {2 3 4 5 6 7 9}. I complete forgot about it and came back this morning to:

I'll be in and out this weekend and have time to try a debug version if there's one available.

gary


----------



## Steven Adeff

Does this script know what is a movie and what isn't? I'd like to just add all the channels to the list of movie channels so that it will find movies on any channel if it will work that way.

thanks!


----------



## CptanPanic

Yes it knows what is a movie. You can put any channels you want.


----------



## whackit

hey I'm back if you have a new version you want me to try...


----------



## CptanPanic

Ok I will try to get one out to you. Haven't gotten to it yet.


----------



## devnull

Okay, I'm about to head to bed so I thought I'd post what I had so far.
The following lines of code (starting at line 161)


Code:


set stationdayfsid [lindex [get_fsidbyprefix "/Schedule" "$stationfsid:
puts "----$stationfsid:$date:"
set stationday [db $db openid $stationdayfsid]
puts "----$title $stationday"
set showings [dbobj $stationday get Showing]

produce the following output:

----4489:11994:
----BEHIND ENEMY LINES dbobj5318
----4489:11995:
----BIG dbobj5336
Ignoring Exception only read 0 bytes of 4096
----4489:12001:
----BLACK KNIGHT dbobj5355
----4489:11997:
----BODY dbobj5374
no such object:
while executing
"dbobj $showing get Time"
("uplevel" body line 32)

All but the last movie, BODY, successfully make it into the Movies file. The error at the bottom is the same error that's been reported through this thread.

*yawn*

gary


----------



## devnull

Okay, after a little sleep and some time in a tcl book (why can't everyone write in ANSI C ?  ), I'm finally on to something useful. My last post was completely useless. I leave it as an object lesson in...well, in *something*!

So, here's the real scoop:


Code:


Line 190:
while { $top >= $bottom } {
       set showing [lindex $showings $current]
       puts "-   T:$top B:$bottom S:$showing"
       set stime [dbobj $showing get Time]

----BODY dbobj5234
-   4489:11997:
-   T:8 B:0 S:dbobj5242
-   T:8 B:8 S:
no such object:
    while executing
"dbobj $showing get Time"
    ("uplevel" body line 36)

So now I know why Tcl doesn't like it, but I might not have time to fix it today.

gary


----------



## devnull

I finally have something that works for me on my DirecTivo. I'd appreciate it
if I could get some feedback on this.

The attached moviesort.tcl should be good for standalone units and combo units alike. The mods I made had to do with error conditions that apparently didn't exist on the standalone.

You also now have the option of creating a "channels.tcl" file in the same directory as moviesort.tcl. This will save you a wee amount of work if you ever have to update your moviesort.tcl (after this time).

gary

CptanPanic: I've also included Changelog mods in the zip file


----------



## whackit

Okay, maybe I'm being a knucklehead... But I did everything the same as before and i keep getting the same thing:



Code:


[FONT=courier new][B]bash-2.02# ./moviesort.tcl
bash: ./moviesort.tcl: No such file or directory[/B][/FONT]

It's there... ls sees it, permissions and paths are set, tried all forms of getting the file in.

Am I really this sleep deprived or is something wrong?


----------



## devnull

Hmm.

You usually see that when you specify an incorrect shell path at the top of the file:

#!/tvbin/tivosh

You might also try to create a blank "channels.tcl" file in the same directory. I don't think this is the problem but I never tested this case.

gary


----------



## whackit

Okay, this is weird.

As far as I can tell it is a problem with the moviesort.tcl file. I have checked the file:

#!/tvbin/tivosh

right there at the top...
blank channels.tcl yields same result. I loaded up the old movieort.tcl ver 0.9.1 and it ran (with all of the previously discussed errors). So the problem must be with the new file. Could I possibly be doing something wrong? It seems to just be a simple recognition issue but I can't figure it. Any more help would be great.

Cheers. W.


----------



## fozzybear

Whackit - NO, you're not sleep deprived although I'm just about getting there. 

I have same problem not being able to execute script although everything looks OK on the surface. This would appear to be an incorrect response fron tivosh to a (haven't found it yet) syntax error or something similar in the script. 

So far I've tried rebuilding the script from the top to try to find where the problem starts but unfortunately another problem with tivosh is that other problems (like partial scripts) can cause tivo to reboot - and mine has several times trying to get to the bottom of this ......

There is probably an obvious error in the script which at the moment is sitting neatly in my blind spot.

UK Thomson Tivo 120GB


----------



## devnull

Thanks for the updates, both of you.

I'll download the file myself and verify that I didn't do some last-minute "harmless" mods that cause this problem. If this proves fruitless I can post the diffs and have you guys edit them into your scripts to see if that gets anywhere. The diffs are painfully small for the amount of time I've spent on this .

gary


----------



## devnull

The problem is apparently a dos2unix thing. The file in moviesort.zip unzips to the correct size of 6991 in Windows but the ftp transfer adds ^M at the end of every line. I tried both binary and ascii transfers. Binary *seems* to produce the correct size but the file still exhibits the problems you're reporting.

I use elvis as my editor on the Tivo and I can make the ^M characters disappear with a simple substitute command. If you can do this substitute in your editor you should be able to run the script.

I'll see if I can put together a proper tar file tommorrow. The original distribution was tar and nobody seemed to have any issues with that.

gary

btw - I noticed that I left printing of the Movies on. I kinda like it this way when I'm running from the command line, but this will produce a few hundred lines of output every time the command runs. If this is a problem, you can edit out the puts command on line 264.


----------



## fozzybear

Still can't see what the problem is! 

You can, however, get the script to run by issuing the command

/tvbin/tivosh moviesort.tcl


from within the directory it resides in.

BTW - The version in the zip file I downloaded extracts to 6955 bytes and there are no signs of any ^M characters.


----------



## whackit

Okay. Here's a file that worked for me. I just resaved it as a unix file in my editor. It now loads and i get this:



Code:


[B][FONT=courier new]invalid command name "24"
    while executing
"24 28 50 242 244 245 247 248 249 251 252..."
    (file "channels.tcl" line 1)
    invoked from within
"source $channels"
    (file "./moviesort.tcl" line 17)[/FONT][/B]

If someone could point out the correct formatting to me I would be appreciative. I'll then include a file in the tarball with correct formatting and instructions for newbies.

Almost there...

NOTE: the board only allows .zip posting so I zipped the .tgz. hope this works. let me know.


----------



## whackit

One step forward...

Okay, so entering the channels the old fashioned way works, no problem. I watch an endless parade of movies on my terminal and a happy "The End".

Two steps back...

When I start the moviesearch module I always get:



> *Processed (1978) of Movies in 14 Seconds*


followed by nothing. The only exception to this is if I specify no search criteria, in which case I get a complete list of all films (a bit daunting). Any ideas?

Is there anything wrong with a midday cocktail?


----------



## devnull

Ooops, my bad. The channels.tcl file should have the format of the array entered "the old fashioned way":

cat channels.tcl
#
# channels.tcl
#
# Put your channels in this file
set preffered_channels 
{ 
2 4 
}


Can you tell me what search criteria you entered? This is what you get if your search criteria doesn't match anything. 

I ran into this with my original debug because DirectTivo doesn't see to have concept of "Number of Stars".

gary


----------



## whackit

Now I get this with the channels file:



> *cat channels.tcl
> #
> # channels.tcl
> #
> # Put your channels in this file
> set preffered_channels
> {
> 24 28 50 242 ....
> }
> can't read "preffered_channels": no such variable
> while executing
> "set preffered_channels"
> (file "channels.tcl" line 6)
> invoked from within
> "source $channels"
> (file "./moviesort.tcl" line 17)*


Not sure what that all is. But it still works fine when the channels are entered in the moviesort.tcl file.

As far as searches... If I enter "All", then "documentarys" or "action" I get no result. I assume based on previous discussions this shoud return all of the subcategory movies. If I search for a keyword it works. Also if I enter "All" and "no subcategory" it returns all the films.

We're getting close. Thanks for all the help.


----------



## devnull

The file below is actually

moviesort.tar.gz

but renamed to

moviesort.tar.zip

to comply with posting rules. You'll need to rename this back to moviesort.tar.gz then do the following:

gzip -d moviesort.tar.gz
cpio -H tar -i < moviesort.tar

I'll try this myself right after I post.

edit: Curses! The kids are watching TV and I can't reboot to get ftpd working!

I also took a look at channels.tcl. The opening brace needs to be on the same line as the 'set' command:

set preffered_channels {
}

vs.

set preffered_channels 
{

}

gary


----------



## whackit

Okay,

channels.tcl and new file are functioning. Noticed that file only puts errors now instead of the whole shabang.

I am still having the same problem with searches involving any subcategory. Keyword searches are okay,it is only a search that involves a subcategory that returns empty. eg

Keyword = abcd, Subcategory = none selected
returns a list

Keyword = abcd, subcategory = any subcat.
empty results

All and no subcat. still returns complete list.

Thanks again...


----------



## Ken Raeburn

I just tried running moviesort 0.9, with tivoweb 1.9.4b4 installed, and it was unhappy:



Code:


bash-2.02# ./moviesort.tcl 

MovieSort: by CptanPanic
As part of the moviesearch module for tivoweb
[url]http://forceconstant.com/tivo[/url]

This program uses the Tivoweb-tcl libraries
written by:SFR,TivoTechie,Lightn,MbM

The program comes with ABSOLUTELY NO WARRANTY.
This program is licensed under the GPL.
See the 'copyright' and 'README' files for copyright and credit information.

Initializing Movie Channels
Initialized 46 Channels

Processing Guide Data ...
retrying after errTmActiveLockConflict ...
retrying after errTmActiveLockConflict ...
retrying after errTmActiveLockConflict ...
retrying after errTmActiveLockConflict ...
retrying after errTmActiveLockConflict ...
retrying after errTmActiveLockConflict ...
retrying after errTmActiveLockConflict ...
(and a whole bunch more)

When I tried 0.8 at first (from tivo.lightn.org), it was also unhappy: After a few of these messages, it spewed some messages about ignoring exceptions (something about "only" reading 30M bytes out of 4096), and then the script exited, giving me a shell prompt, and my TiVo rebooted.

This time, after running out of patience after a couple dozen of these messages slowly went by (and not trusting it to run while I watch TV, lest it crash again right during a good scene), I hit ^C, and, well, that seems to have crashed the TiVo too.

Don't know about the ActiveLockConflict; is it trying to do too much work at once, or just failing to grab a lock at all?

There are a couple of messages in /var/log/tverr that probably correspond to the crash times, saying:



Code:


Nov 13 09:02:44 (none) EvtSwitcher[73]: MFS-using group 173 died!

I think I'll hold off on trying it again just yet.  Any ideas?

Oh, yeah, this is a Philips HDR31202, with disk upgrade and tivonet.


----------



## devnull

> _Originally posted by whackit _
> *Okay,
> 
> channels.tcl and new file are functioning. Noticed that file only puts errors now instead of the whole shabang.
> 
> I am still having the same problem with searches involving any subcategory. Keyword searches are okay,it is only a search that involves a subcategory that returns empty. eg
> 
> Keyword = abcd, Subcategory = none selected
> returns a list
> 
> Keyword = abcd, subcategory = any subcat.
> empty results
> 
> All and no subcat. still returns complete list.
> 
> Thanks again... *


Okay, I'm being an incommunicative spaz here .

I took out the movie printing because it was the way the original script was distributed. I kinda liked it when running from the shell, but I could see it being a problem appending 400+ lines to a log on a daily basis. When I get some time I'll figure out how to do command line args in tcl and build in proper verbosity and debug flags.

On the keyword thing, I think what's probably going on is that the category types aren't the same as they are in a standalone. That part of the script calls a javascript that I'm going to hunt down (call it CSI: Moviesearch). The good news is that there's a working example in the Search module code.

Ken: Since I don't recognize your model string, I'm assuming you have a standalone so I can't help you with direct experience. I can vouch for the fact that the errActiveLock conflict is reasonably normal and doesn't affect the final output.

I have seen the "got only X of Y bytes" message only when I was learning how the script worked (read: when I broke it). You might want to try my mods for DTivo since they're really fixes for pathological corner cases.

I can also confirm the fact that ^C-ing a script will result in your tivo rebooting. I haven't, however, encountered any code conditions that cause a reboot. Perhaps the same exit condition hit in the ^C case can also be hit with the code.

gary

btw - aside from the channels.tcl bug, I was able to verify that the new tar.zip-that's-really-gz file works.


----------



## devnull

Okay, I got the crash as well. This is the same code run in the exact same way as I did it before. I even tried it again just to make sure it wasn't a fluke. Same result: GSOD.

Oh well. I guess I'll be putting this one on the shelf. GSOD's warning was a bit too dire for my tastes.

gary

MovieSort: by CptanPanic
DTivo fixes by devnull

As part of the moviesearch module for tivoweb
http://forceconstant.com/tivo

This program uses the Tivoweb-tcl libraries
written by:SFR,TivoTechie,Lightn,MbM

The program comes with ABSOLUTELY NO WARRANTY.
This program is licensed under the GPL.
See the 'copyright' and 'README' files for copyright and credit information.

Initializing Movie Channels
Initialized 56 Channels

Processing Guide Data ...
retrying after errTmActiveLockConflict ...
Ignoring Exception only read 0 bytes of 4096
Ignoring Exception only read 0 bytes of 4096
Ignoring Exception only read 0 bytes of 4096
retrying after errTmActiveLockConflict ...
error finding valid showing for BLUE VINYL
error finding valid showing for BREWSTERS MILLIONS
retrying after errTmActiveLockConflict ...
error finding valid showing for BURDEN OF PROOF
Ignoring Exception only read 0 bytes of 4096
retrying after errTmActiveLockConflict ...
retrying after errTmActiveLockConflict ...
Ignoring Exception Error couldn't find starting offset in program key
Ignoring Exception only read 0 bytes of 4096
error finding valid showing for DANIELLE STEELS THE RING
Filesystem assert: err || cb == 0 at fsactive.C line 464 in int FsActive::MappedRead(c
lass FsRunList *, long unsigned int, void *, long unsigned int)
Filesystem flagged as inconsistent!
Tmk Assertion Failure: err || cb == 0
int FsActive::MappedRead(class FsRunList *, long unsigned int, void *, long unsign
ed int), line 464 (fsactive.C)
Tmk Fatal Error: Thread tivosh <168> died due to signal -2
1a2fb08 1a2e060 1a15c14 1b864c8 1b85dd0 1b7ac94 1c49038 1c47fe0 1c470f0 1c7175c 1c5b2f
0 1c87848 1c7175c 1c5b2f0 1c47b34 1c470f0 1c7175c 1c5b2f0 1c87dc0 1c7175c 1c5b2f0 1c87
dc0 1c7175c 1c5b2f0 1c87848 1c7175c 1c5b2f0 1c87dc0 1c7175c 1c5b2f0 1c7e2a0 1c7f7a8 1c
46b28 1c22aec 1800134


----------



## jbez

Any idea what's causing this? it happens when i click the info link for a given result after a movie search.

sometimes it'll print out some of the summary below, but always gives a error trace.

i'm using tivoweb1.9.4 release

--cut here--
action_showing '/1068392/20' ''
can't read "genrenums": no such variable
while executing
"lsearch $genrenums $genre"
("foreach" body line 2)
invoked from within
"foreach genre $genres {
set genreindex [lsearch $genrenums $genre]
if { $genreindex != -1 } {
if { $genrestr != "" } {
append ..."
("uplevel" body line 255)
invoked from within
"uplevel $body"
invoked from within
"transaction {uplevel $body}"
(procedure "RetryTransaction" line 5)
invoked from within
"RetryTransaction {
if { [regexp {([0-9]*)/(.*)} $objectid junk fsid subobjid] } {
set showing [db $db openidconstruction $fsid $subobjid]
} els..."
(procedure "::action_showing" line 47)
invoked from within
"::action_$action $chan $part $env"
("eval" body line 1)
invoked from within
"eval {::action_$action $chan $part $env}"
--cut here--


----------



## mrtickle

Well the it's a bit of a coincidence that it has stopped working this week, don't you think?  I expect that when you apply lightn's patch to tivoweb (posted since you wrote the above - see the tivoweb thread) then everything that relied on genres will start working again.


----------



## ryan94z

Does anyone have a working copy of this script in it's full form? The link in the first post is bad. Thanks.


----------



## xiojason

I made some minor modifications to CaptnPanic's moviesearch.itcl tivoweb module because it was becoming difficult for me to figure out if, for example, the movie listed as "FLY" was actually "The Fly" or another movie just called "Fly". 

moviesort.tcl strips out articles like "The" and ampersands (&) from the titles and makes them all UPPERCASE when it creates its database. Unfortunately, it uses these same strings in the tivoweb display.

My modifications copy some functionality out of action_showing in ui.itcl and put it into outputMovieRows in moviesort.itcl, allowing the display of "The Full, Mixed Case Title With Punctuation & Articles" instead of "FULL MIXED CASE TITLE WITH PUNCTUATION ARTICLES". 

If you'd like to give it a try, grab it from redbomb.com/moviesearch.itcl

I'll attach it here as well for safe-keeping. It's small.


----------



## xiojason

Ooops. Lost the attachment when I went to edit my message, and you can't attach after the fact. Here's the attachment.


----------



## alextegg

Wanted to install this, but http://forceconstant.com/tivo isn't working.

Can anyone else send me the install instructions

Ta,

Alex


----------



## sanderton

The files for this are hard to find, so here are my copies.

I have adapted them a little to work on UK TiVos; you may have to alter them some more to work on a US machine. (One of the files is missing, so I hacked moviesort.tcl to live without it by pointing to some TiVoWeb files and hard coding some variables)

Basic instructions:

moviesort.tcl is a standalone script which generates a db of movies.
moviesearch.itcl is a TW module to search the db

create a directory for the db:

mkdir /var/hack/tivoweb-tcl/modules/moviedata

copy moviesort.tcl to /var/hack and make it executable.

Edit it to include a list of the channles you want it to search

Configure cron to run it daily or run it by hand before you access the db

drop moviesearch.itcl in ../modules and restart TiVoWeb


----------



## lgkahn

none of the versions of moviesort.tcl posted here worked on my dtivo so here is the modified one along with the search module.. I had to add a variable comment some stuff out and change the moviegenre type because apparently it was changed at some point to be consistent with other tivos...

this is fore 3.1.1b and 3.1.1c dtivo and works with tivowebplus 1.0

enjoy

make sure to chmod 755 both files and put the .itcl file in your modules directory under your tivoweb-tcl

also if your tivoweb-tcl is not in /var/local/tivoweb-tcl you will have to change that line in the moviesort.tcl file


----------



## rpongett

I added hovers (little boxes that pop up when your cursor rolls over something) to the movie titles so that the description, actors and orig air dates pop up in little boxes.

That helps when scanning through movies. You can just roll your mouse cursor over each title instead of clicking on each one.

Only the moviesearch.itcl file needed changing. I zipped it below with the moviesort.tcl file.

----------------
Edit: I added the station call sign (e.g., HBO, TBS, etc.) and Director to the hover text.


----------



## bjarne

I really like the hovers, it makes going through the listing a lot faster.

I am using the version I downloaded from rpongett's post, and I am using it with a DTiVo S1 running 3.1.0b. I am having some problem with Movie Subcategories. If I don't specify any sub-category, I get a listing of about 13 pages, and I have checked that some of them are "Comedy". However, if I specify Movie Sub-category "Comedy" (or any other sub-category) I get an empty listing. I also do not get any entries in the "Ratings" column.

Any ideas what could be wrong ?


----------



## David Platt

Is anybody still having problems with Moviesearch causing reboots? I've got the version from lgkahn's post above set up to run as a cron job at 4:00 am every morning, and about 1 out of every 3 times it runs, it causes a reboot followed by a GSOD that always fixes itself.

*Edited to add:*Forgot to mention that this is on a monted Series 2 DirecTiVo.


----------



## lgkahn

I have that problem occasionally also ... but haven't look into why it is crashing... it is nothing I have done to the script so it must be something in the original script... haven't had enought time to look into exactly what it is .. it appears to be doning something in the mfs database that the box doesn't like but as you summized it doesn't appear to happen all the time...

only thing I can guess is there is some strange error case in the data that needs to be checked to avoid the situation so it doesn't crash and a whole lot more i/o before/after statements is going to be needed to determine exactly which statement is causing the crash so we can avoid whatever it is doing that the box doesn't like... unfort. I just got it working on the newer series 2 boxes and didn't write it... next time it crashes on me when I have some spare time.. maybe I will look into it.. but someone else also is welcome to look into it....


----------



## lgkahn

I have also noticed that unless you do the searching for the movies imediately after running the moviesort.tcl you get error opening db errors on the tivoweb pages... not sure why this is either which kind of rules out running a cron job and then doing the seach later.... this appears to be on first glance to be a problem with the original script if any data has changed since the indexing was performed... all in all it seems to be really poorly written.. but I don't have the time or the desire to rewrite it... For now I just make sure the box is not doing anything vital and then go telnet to it and run moviesort.tcl & (the not doing anything vital at the moment is just it case it decides to reboot this time) then I immediately go in and go through my pages looking at all the newly indexed movies... This for now seems to be the only reliable way to use the damn thing...

sorry...


If it does reboot I have found that it is due to something it doesn't like in the data because no matter how many time you run it , it will continue to reboot each time... I find if you leave it till the next day it may then work ok.
(or not as the case may be)


----------



## David Platt

> _Originally posted by lgkahn _
> *For now I just make sure the box is not doing anything vital and then go telnet to it and run moviesort.tcl & (the not doing anything vital at the moment is just it case it decides to reboot this time) then I immediately go in and go through my pages looking at all the newly indexed movies... This for now seems to be the only reliable way to use the damn thing...
> *


I think that's going to have to be how I use it from now on, too. I only look at it maybe once every couple of weeks, so I don't want to risk the reboot every morning with the cron job.


----------



## SteveTheITGuy

CptanPanic/rpongett,

I'm kind of new to this language (I'm a VB guy myself). I looked through the code and wanted to add the description (that rpongett added in the hover) as it's own column in the output. So it would now read: Title, Description, Release Date, Rating.

Would either of you point me to the correct section of the code to accomplish this? 

Thanks for your help in advance.


----------



## SteveTheITGuy

Guys.. never mind. I was adding it to the correct area. I did a quick restart of TivoWeb and everything started showing up as expected.


----------



## mrshock

So, after loading and running the most recent version I receive this error message on TWP interface before the movie listing is displayed. It seems to be working, so I have just ignored the message, but it is reported (annoyingly) above the start of the results.

INTERNAL SERVER ERROR
--cut here--
action_moviesearch '' 'set "searchby" "0";set "scat" "0";set "start" "0";set "stars" "0";set "sort" "0";set "submit" "Search";'
can't open object (errDbNotFound)

while executing
"db $db openidconstruction $sfsid $subobjid"
("uplevel" body line 5)
invoked from within
"uplevel $body"
invoked from within
"transaction {uplevel $body}"
(procedure "RetryTransaction" line 5)
invoked from within
"RetryTransaction {

# edit by SWA
if { [regexp {([0-9]*)/(.*)} $objectid junk sfsid subobjid] } {
set showing [db $db ..."
(procedure "outputMovieRows" line 17)
invoked from within
"outputMovieRows $chan $movies $start $end"
(procedure "::action_moviesearch" line 189)
invoked from within
"::action_$action $chan $part $env"
("eval" body line 1)
invoked from within
"eval {::action_$action $chan $part $env}"
--cut here--


----------



## 10203

*can't open object (errDbNotFound)* is a generic error - an exit/restart of TW(P) or a reboot of the TiVo should fix it.


----------



## dspille

I'm getting the following when trying to run Stuart's moviesort.tcl script on an SA1. Any ideas? I believe I've set the correct path and channels.

object not found (errNmNameNotFound)

while executing
"mfs find $guideindexdir/ChannelTable"
("uplevel" body line 2)
invoked from within
"uplevel $body"
invoked from within
"transaction {uplevel $body}"
(procedure "RetryTransaction" line 5)
invoked from within
"RetryTransaction {
set channeltablefsid [lindex [mfs find $guideindexdir/ChannelTable] 0]
set channeltabledata [mfs get $channeltablefsid]..."
(procedure "init_channelindex" line 58)
invoked from within
"init_channelindex"
(file "/var/hack/tivoweb-wml-beta2/modules/index.itcl" line 658)
invoked from within
"source $tivoweb/modules/index.itcl"
(file "/var/hack/moviesort.tcl" line 56)


----------



## dspille

Got it working!  

Had to change the version3 variable from "false" to "true", and I had to change the movieGenre variable from 1 to 1006.

Great hack and thanks to all!!

Dennis


----------



## ron347

My Directivo S1 Sony T-60 also reboots occasionally.

Building the Title file always works.
Building the Movies file sometimes reboots.

My last reboot caused a GSOD, but the telnet seesion posted an error first.

Filesystemassert: err || cb == 0 at fsactive.C line 470 in int FsActive::Mapped Read(class FsRunList *, long unsigned int, void *, long unsigned int)
File system flagged as inconsistant!
Tmk Assertion Failure: err || cb ==0
int FsActive::Mapped Read(class FsRunList *, long unsigned int, void *, long unsigned int), line 470 (fsactive.C)
Tmk Fatal Error: Thread tivosh <4939> died due to signal -2
<a bunch hex data here>

I don't know if any of that is helpful in understanding the problem, but I'll still plan to looking into that.

Ron.


----------



## FresYES

I am experiencing the same reboot followed by GSOD when attempting to run moviesort.tcl (noted by LgKahn and others) on my Series 2 DTivo ver. 6.2. Has anyone come up for a fix for this by any chance?


----------



## nux

I know this is a very old thread but has anybody managed to get this module working with tivowebplus ??


----------



## dave7101

anyone? great hack, but the gsod is making me nervous... just had one on first try of this module.


----------



## dave7101

using s2 dtivo (hr10-250) with twp1.2.1


----------



## nux

Thanks dave, Im also using a s2 tivo with tw 1.2.1
Did you need to alter the files to get the module working... ? I must have tried at least half a dozen different modules without sucsess. Which are you using ?

Im trying to get lgkahn's working with but without sucsess . Would anybody be able to assist ? Telnet screen dump attached.


----------



## cognac

I've been playing around wit moviesort.tcl with a Dtivo runing 6.2 and tivowebplus 1.2. Has anybody got it runing?

I get the following errors.

Tivo_Den-TiVo# ./moviesort.tcl

MovieSort: by CptanPanic
DTivo fixes by devnull
New DTivo fixes for tivowebplus Release 1.0 April 2004 by LGKahn

As part of the moviesearch module for tivoweb

-initializing logo index
-initializing channel table
--caching 721 channels for source of type=6 (DirecTV)
object not found (errNmNameNotFound)

while executing
"mfs find $guideindexdir/ChannelTable"
("uplevel" body line 2)
invoked from within
"uplevel $body"
invoked from within
"transaction {uplevel $body}"
(procedure "RetryTransaction" line 5)
invoked from within
"RetryTransaction {
set channeltablefsid [lindex [mfs find $guideindexdir/ChannelTable] 0]
set channeltabledata [mfs get $channeltablefsid]
}"
(procedure "init_channelindex" line 125)
invoked from within
"init_channelindex"
(file "/ptvupgrade/tivowebplus/modules/index.itcl" line 736)
invoked from within
"source $tivoweb/modules/index.itcl"
(file "./moviesort.tcl" line 63)


----------

