markboy08
05-03-2003, 08:28 PM
I am writing a new script to rename titles in Now Showing. What I want to do is add a prefix to each of the titles so that in conjunction with the S-O-R-T by Title backdoor I can precisely control the order that programs appear in Now Showing. I am running on a v3 SA Philips Series 1 TiVo.
I have patterned my script after much of the code in edditititle.tcl, TivoTitile.tcl and TivoWeb ui.tcl. The title renaming works fine, but the problem I'm having is that after the title is renamed it never gets resorted, i.e. it stays in the same position on the Now Showing list (which is sorted by title), even though the renamed title is no longer in the correct sort sequence.
I found a piece of code in Tivoweb ui.tcl that corrects this:
if { $serverid != "" && $::dtivo == 0 } {
set newpobj [db $db create Program]
dbobj $newpobj copyfrom $program
dbobj $newpobj remove ServerId
dbobj $newpobj remove ServerVersion
dbobj $showing set Program $newpobj
}
It basically creates a new Program obect and copies everything but ServerId/Version from the old Program, and replaces the old program with the new copy in the Showing object (apparantly creating a new program causes the recording to get inserted in the proper order in Now Showing?)
Does anyone know:
- Is this the only way to get renamed titles to sort properly alphabetically? I'm very nervous about replacing the Program object
- What is the reason for deleting the ServerId/Version from the new Program?
- Will the old Programs that were "disconnected" stay around and cause space/fragmentation problems? I plan to rename almost all of my shows on an hourly basis so this could be a big issue.
Thanks!
I have patterned my script after much of the code in edditititle.tcl, TivoTitile.tcl and TivoWeb ui.tcl. The title renaming works fine, but the problem I'm having is that after the title is renamed it never gets resorted, i.e. it stays in the same position on the Now Showing list (which is sorted by title), even though the renamed title is no longer in the correct sort sequence.
I found a piece of code in Tivoweb ui.tcl that corrects this:
if { $serverid != "" && $::dtivo == 0 } {
set newpobj [db $db create Program]
dbobj $newpobj copyfrom $program
dbobj $newpobj remove ServerId
dbobj $newpobj remove ServerVersion
dbobj $showing set Program $newpobj
}
It basically creates a new Program obect and copies everything but ServerId/Version from the old Program, and replaces the old program with the new copy in the Showing object (apparantly creating a new program causes the recording to get inserted in the proper order in Now Showing?)
Does anyone know:
- Is this the only way to get renamed titles to sort properly alphabetically? I'm very nervous about replacing the Program object
- What is the reason for deleting the ServerId/Version from the new Program?
- Will the old Programs that were "disconnected" stay around and cause space/fragmentation problems? I plan to rename almost all of my shows on an hourly basis so this could be a big issue.
Thanks!