Todd C. Miller
GitHub Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Ads and Showcases

Removing Ads from the Main Menu of a Series 1 TiVo

TiVo will periodically place an item in the main menu that points to an advertisement of some kind. Such menu items have a start next to them. This is not a big deal but it does become annoying after seeing it there for the Nth time, and the info is available in Showcases as well so there’s no need to clutter up the main menu. Happily, if you have shell access to your TiVo, you can get rid of the ads in the main menu.

First off, you will need the dbset utility. It just makes life a bit easier changing things in the database. Once you have dbset in your PATH on the TiVo, you are ready to run tivosh and do some fiddling. In the follow real-life example, we get rid of an annoying Lexus ad. Note that dates are in days since the epoch (Jan 1, 1970). To convert from Unix time format, simply divide the return value of the Unix time() function by the number of seconds in a day (60 * 60 * 24). If you have perl available, you can get the time in the form the TiVo wants it by running:

perl -e 'printf("%d\n", (time() / (60 * 60 * 24)))'

The ads are stored in /MenuItem/1.

TiVo [~] # tivosh

% mls /MenuItem/1
Directory of /MenuItem/1 starting at ''

    Name                      Type        FsId      Date  Time   Size    
    ----                      ----        ----      ----  ----   ----    
    00056514:11655            tyDb      353556  11/13/01 01:23    204    

There will probably be several entries. You can tell the most recent ones by the Date and Time fields. To see the contents of an entry, we call dumpobj on its FsId.

% dumpobj 353556
MenuItem 353556/11 {
  Data           = 2/lex/lexsctag010
  DisplayName    = {Win The All-New Lexus ES 300}
  Expiration     = 11655
  IndexPath      = /MenuItem/1/00056514:11655 /Server/4931111
  ServerId       = 4931111
  ServerVersion  = 3
  StartDate      = 11634
  Type           = 1
  UniqueName     = {Lexus Approval}
  Version        = 1
}

To see the Expiration date in a more normal format, you can use something like:

perl -e 'use Time::localtime; print ctime(11655 * 60 * 60 * 24), "\n"'

Note that some fields may not be displayed nicely as they are not listed in the schema for some reason. On my TiVo with 3.0 software the StartDate is no longer displayed. If the StartDate field is listed, you can simply make the Expiration date equal to the StartDate.

% dbset 353556/11 Expiration 11635

If the StartDate is not specified, you can just subtract a week or two from the current Expiration date and use that.

Tweaking Showcases

It is also possible to modify entries in the Showcases menu. The most useful thing is to “hide” unwanted junk that just clutters up the menu (advertisements, channels you don’t receive, etc).

% mls /Showcase
Directory of /Showcase starting at ''

    Name                      Type        FsId      Date  Time   Size    
    ----                      ----        ----      ----  ----   ----    
    00000001:131537           tyDb      131537  11/22/01 03:31   1288    
    00000001:352441           tyDb      352441  11/22/01 03:31    856    
    00000004:3323             tyDb        3323  11/22/01 03:31   1872    
    00000006:365998           tyDb      365998  11/18/01 02:29    952    
    00000008:3079             tyDb        3079  11/22/01 03:31   2588    
    0000000c:2949             tyDb        2949  11/17/01 02:11   1344    
    00000014:2518             tyDb        2518  11/17/01 02:11   2844    
    00000018:2736             tyDb        2736  11/22/01 03:31   1072    
    0000001a:226543           tyDb      226543  11/22/01 03:31   1592    
    00000024:3574             tyDb        3574  11/22/01 03:31   1228    
    00000028:2351             tyDb        2351  11/18/01 02:29   1712    
    0000002c:2788             tyDb        2788  11/18/01 02:29   1412    
    00000030:2441             tyDb        2441  11/22/01 03:31    892    
    00000038:2632             tyDb        2632  11/22/01 03:31   1268    
    0000003c:131566           tyDb      131566  11/22/01 03:31   3272    
    00000040:3162             tyDb        3162  11/18/01 02:28   2280    
    00000044:2865             tyDb        2865  11/17/01 02:11   1864    
    00000048:3410             tyDb        3410  11/22/01 03:31   1636    

You can guess by the date what is probably an ad (also the fsid tends to be much higher for the new entries)

% dumpobj 352441
Showcase 352441/23 {
  Banner         = 356817/-1
  BigBanner      = 356820/-1
  ClipAvailableIcon = 352404/-1
  DataSetName    = SC_lex
  ExpirationDate = 11661
  ExpirationTime = 43199
  Icon           = 352404/-1
  Identifier     = 2/lex/lexsctag010
  IndexPath      = /Showcase/00000001:352441 /Server/4917636 /Uuid/uuid-1003439434:(192.168.240.42)
  InfoBalloon    = 3
  Item           = 352441/24 352441/25
  Name           = Lexus
  SequenceNumber = 1
  ServerId       = 4917636
  ServerVersion  = 7
  Uuid           = uuid-1003439434:(192.168.240.42)
  Version        = 1
}

If you set the “Hidden” field to 1 you won’t see the entry.

% dbset 352441/23 Hidden 1

When looking at the showcase with hidden entries, you can hit TD-TU-TD-Record and the screen slides off and slides back on showing the hidden objects. Do it again and it goes back to normal. You probably need to have backdoors enabled for this to work though.

Note that the showcases will likely be reset to their old state after your TiVo does a daily call. I use the following script to hide a bunch of junk:

#!/tvbin/tivosh
#
# Hide showcases I don't want to see

source $tcl_library/tv/Inc.itcl

set db     [dbopen]
set ShowMeNot [list "SC_lex" "SC_st" "SC_bmw" "SC_starz" "SC_hbo" "SC_nfl" "SC_nfla" "SC_mc" "SC_max" "SC_flix"]

ForeachMfsFile id name type "/Showcase" "" {
    try {
	RetryTransaction {
	    set obj [db $db openid $id]
	    set ds_name [dbobj $obj get DataSetName]
	    foreach bad_ds_name $ShowMeNot {
		if { $ds_name == $bad_ds_name } {
		    dbobj $obj set "Hidden" 1
		}
	    }
	}
    } catch errCode {
	putlog "Error hiding Showcases: $errCode"
    }
}

As you can see, I just iterate over each entry and check its DataSetName against a blacklist. Another approach is to use a whitelist instead but then you don’t see new things as they are added. If you have cron installed on your TiVo you could run such a script periodically.