PDA

View Full Version : Automatically skip start padding with an added bookmark.



petestrash
19-07-2008, 02:35 PM
drnull at DealDatabase has just added a cool feature to endpadplus, which automatically adds a bookmark to the place where a show is meant to start (skipping any start padding).

I find that I am fast forwarding just about every show to get to the start, but start padding does come in handy sometimes.

So with this feature when you press play the show is already lined up at it's scheduled start time, but for the few that started early you may need to rewind a little.

I have modified the code to work with our endpad.tcl, and it works for me. I have not tested it with negative endpadding, as I don't use it but would like to hear if it works.

As usual with these things no guarantees and if you break something, you own all the pieces.

Here is the diff between the current release and what has been added.

1380,1383d1379
< # Add Bookmark for this showing to start at the original time
< set nbm [db $db createsub Bookmark $rec]
< dbobj $nbm set TimeMs [expr $startpadtoset * 1000]
< dbobj $rec set Bookmark $nbm


This is what it looks like in the code.

if {$startpadtoset > 0} {
RetryTransaction {
# Alter the database record to add the padding
set db [dbopen $dbPoolSize]
set rec [db $db openid $nextrecfsid]
dbobj $rec set StartPadding $startpadtoset
# Add Bookmark for this showing to start at the original time
set nbm [db $db createsub Bookmark $rec]
dbobj $nbm set TimeMs [expr $startpadtoset * 1000]
dbobj $rec set Bookmark $nbm
dbclose $db
}
msg " Added $startpadtoset seconds start padding to $ntitle on $ncallsign $ntypestring"
} else {
log " Can't add start padding to $ntitle"
}


Note that those people on very old OzTiVo images may still be using endpadplus, this version will not work on endpadplus. Use the version on DealDatabase instead.

Peter.

I have attached a copy of the pached endpad.tcl, this is based on the current 1.5.4 version which is newer than most peoples 1.5.1, but is a direct replacement.
_______________________________________________

MattCallow
23-07-2008, 09:34 AM
Is this really based on 1.5.4? The new file still says 1.5.1
Anyway, I'm going to give it a try. Could be a useful feature - thanks

Matt

petestrash
23-07-2008, 01:02 PM
Good catch, I uploaded the wrong one. It has the fix, but is based on the 1.5.1 version same as the OzTiVo distribution.

I'll put the right one up soon.

Peter

petestrash
23-07-2008, 02:43 PM
Attachment has been fixed.

Peter.