Hack 96. Making Recordings Start Late and End Early

   

Hack 96 Making Recordings Start Late and End Early

figs/moderate.gif figs/hack96.gif

Only interested in your local news for tomorrow's weather report, but you find yourself having to fast forward through the whole thing every night? By altering TiVo's resources, you can allow scheduled recordings of only the portion of a show you're interested in .

While scanning your TiVo's mind (a.k.a. resources ) can make for some interesting reading, there are actually all sorts of things you can do by writing to it. This hack does more than make a cosmetic change to a menu or tweak a display setting; it actually changes the way TiVo works.

The script adds negative values to the Start Recording and Stop Recording options, allowing you to start recordings late and end them early, not just start early and end late. This is useful for recording tomorrow's weather forecastthe last 10 minutes of your local 10 o'clock newswithout having to record the whole broadcast and fast forward your way through.

As is, this hack will work only under TiVo OS 3.x.

The Code

Mike Baker wrote this padhack.tcl script, which modifies resource group 32, items 19 and 21, which supply values to the Start Recording and Stop Recording options.

 #!/tvbin/tivosh EnableTransactionHoldoff true set db [dbopen] RetryTransaction {   # get handles to the right database entries   set swsysa [db $db open "/SwSystem/ACTIVE"]   set tmpgrp [dbobj $swsysa get ResourceGroup 32]   # add new values for the start recording times   set tmpres [dbobj $tmpgrp get "Item" 19]   dbobj $tmpres set String "On-time01 minute early602 minutes  [RETURN]  early1203 minutes early1804 minutes early2405 minutes early30010  [RETURN]  minutes early6001 minute late-602 minutes late-1203 minutes late  [RETURN]  -1804 minutes late-2405 minutes late-30010 minutes late-600"  [RETURN]  # add new values for the stop recording times  [RETURN]  set tmpres [dbobj $tmpgrp get "Item" 21]   dbobj $tmpres set String "On-time01 minute longer602 minutes  [RETURN]  longer1205 minutes longer30015 minutes longer90030 minutes  [RETURN]  longer18001 hour longer36001 1/2 hours longer54003 hours  [RETURN]  longer108001 minute shorter-602 minutes shorter-1203 minute  [RETURN]  shorter-1804 minutes shorter-2405 minutes shorter-30010 minutes  [RETURN]  shorter 600"      dbobj $tmpgrp remove "CompressedFile" } 

To understand how this works, run dump.tcl [Hack #94] and find resource group 32. You'll see that item 19 dictates values for the Start Recording offset, and item 21 controls the Stop Recording offsets:

 32 19 {On-time01 minute early602 minutes early1203 minutes early1804  minutes early2405 minutes early30010 minutes early600} ... 32 21 {On-time01 minute longer602 minutes longer1205  minutes longer30015 minutes longer90030 minutes longer18001 hour longer36001  1/2 hours longer54003 hours longer10800} 

Save the code as padhack.tcl in TiVo's /var/hack/bin directory and make it executable:

 bash-2.02#  chmod 755 /var/hack/bin/padhack.tcl  

Running the Hack

Run the script from TiVo's command line Section 3.3:

 bash-2.02#  /var/hack/bin/padhack.tcl  

Reboot your TiVo, schedule a recording, and visit the Recording Options screen to see your changes in effect, as shown in Figure 7-4. Cool, huh? And it's useful if all you want to see is the Top 10 List at the beginning of a late night talk show, the weather report at the end of the news, headlines at the top of every hour on CNN, and so forth.

Figure 7-4. Setting your Season Passes to start late and end early
figs/tivo_0704.gif

You have to run the script only once, because the altered settings persist through reboots.

Hacking the Hack

You're not confined to the changes you've just made. Take a closer look at the lines starting with dbobj $tmpres set in the padhack.tcl code. The groupings inside the { and } actually set the values for the TiVo. For example, On-time has an offset of , while a minute early has an offset of 60 , and so forth.

We can insert any custom value that we want. Change it to look like this:

 dbobj $tmpres set String "On-time01 minute early602 minutes early1203  [RETURN]  minutes early1804 minutes early2405 minutes early30010 minutes  [RETURN]  early600  17 minutes early1020  1 minute late-602 minutes late-1203  [RETURN]  minutes late-1804 minutes late-2405 minutes late-30010 minutes late  [RETURN]  -600" 

That new 17 minutes early1020 segment adds the ability to the stop recording 17 minutes from the end of a program.


   
Top


Tivo Hacks. 100 Industrial-strength Tips Tools 2003
Tivo Hacks. 100 Industrial-strength Tips Tools 2003
ISBN: 1597490318
EAN: N/A
Year: 2004
Pages: 164

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net