TiVo Community
TiVo Community
TiVo Community
Go Back   TiVo Community > Main TiVo Forums > TiVo Series 1 - UK
TiVo Community
Closed Thread
Forum Jump
 
Thread Tools
Old 10-13-2003, 03:18 PM   #121
sanderton
TiVoer since 11/2000
 
Join Date: Jan 2002
Posts: 6,341
Local time is hard work, and anyway local time will be GMT in a few days, at least over here.

TiVo does everything in seconds, even dates (v. big numbers!). Sometimes I convert back to minutes, sometimes life is just too short...

End padding takes priority, which just reflects the way I prefer to work. In practice, unless you set very large amounts of padding, it's rare to have an overlap. In fact I had to run endpad with 15 mins start and 15 mins end to force some to test the code!
sanderton is offline  
Old 10-13-2003, 03:22 PM   #122
tivo_boj
Tivo is getting old
 
Join Date: Feb 2001
Location: Pitsea, Basildon, Essex, UK
Posts: 215
Quote:
Originally posted by sanderton
I've made them less verbose, and while I'm not sure how big the /var partition is, if you fill it then your TiVo is just far too stable!
yes , much better, but if I do delete the log file (now in Var/Logs)will endpad start a new one ( just in case I ever need to).

I also take it that end padding takes preference to start padding in that it checks for a to see if a start of a programme clashes with required end padding and if not adds the pad. It then checks the start of the next programme 1 minute plus the start pad setting time before the start of that programme. If that now clashes with the programme plus end pad ( ie the total record time), it does not pad the start.

is this correct, if so might be worth adding such an explaination to the first post.

Thanks ....1.2 now loaded and awaiting my first start and end pads!!!!
__________________
TiVo Boj (Tivo -Nov 2000)
GSOD caused 160G upgrade Oct 2006. TivoWebPlus (beta 1.4.0) Using PPP over serial (Aug 2002). & Turbocard ( 2005)
tivo_boj is offline  
Old 10-13-2003, 03:30 PM   #123
sanderton
TiVoer since 11/2000
 
Join Date: Jan 2002
Posts: 6,341
I'd stop endpad first, then delete the log. Don't know how happy it will be to have a file it open deleted while it is using it! It starts a new one each time you run it.

If there is a 5 minute gap between programmes and you have start padding for 5 mins and end padding of 5 mins, you will get 5 mins of end padding and 0 mins of start padding.

If there is a 5 min gap and you set 4 mins of end padding and 4 mins of start padding you will get 4 mins of end paddinga nd 1 min of start padding.

I hope....
sanderton is offline  
Old 10-13-2003, 03:34 PM   #124
Fozzie
Registered User
 
Fozzie's Avatar
 
Join Date: Sep 2001
Location: Alton, Hants, UK
Posts: 837
Quote:
Originally posted by sanderton
Local time is hard work, and anyway local time will be GMT in a few days, at least over here.
Good point

Quote:
TiVo does everything in seconds, even dates (v. big numbers!). Sometimes I convert back to minutes, sometimes life is just too short...
Understood.

Quote:
End padding takes priority, which just reflects the way I prefer to work.
That approach suits me too.

Oh yeah, first successful end pad and a start pad. Great stuff.
Fozzie is offline  
Old 10-13-2003, 03:41 PM   #125
ccwf
国際化 Member
 
ccwf's Avatar
 
Join Date: Dec 2001
Location: Malibu
Posts: 8,634
Quote:
Originally posted by sanderton
I'd stop endpad first, then delete the log. Don't know how happy it will be to have a file it open deleted while it is using it!
In Linux/Unix systems, deleting an in-use file deletes it from the directory it is in but not from the disk. Files are not really deleted until all references to them are removed; so as long as endpad keeps a reference to it (even via redirection, but not always with network mounts if you install a network filesystem on your TiVo), it will remain even though invisible when trying to list files using ls.

This behavior is very different from the DOS/Windows way of doing things.
__________________
ccwf

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

TiVo
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

中日韓
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
ccwf is offline  
Old 10-13-2003, 03:45 PM   #126
tivo_boj
Tivo is getting old
 
Join Date: Feb 2001
Location: Pitsea, Basildon, Essex, UK
Posts: 215
Quote:
Originally posted by sanderton
If there is a 5 minute gap between programmes and you have start padding for 5 mins and end padding of 5 mins, you will get 5 mins of end padding and 0 mins of start padding.

If there is a 5 min gap and you set 4 mins of end padding and 4 mins of start padding you will get 4 mins of end paddinga nd 1 min of start padding.

I hope....
Thats better than I expected, I think I will now increase the start pad, I did have 1 minute start, 4 minute end , think will move both to 4 minutes.
__________________
TiVo Boj (Tivo -Nov 2000)
GSOD caused 160G upgrade Oct 2006. TivoWebPlus (beta 1.4.0) Using PPP over serial (Aug 2002). & Turbocard ( 2005)
tivo_boj is offline  
Old 10-13-2003, 03:52 PM   #127
sanderton
TiVoer since 11/2000
 
Join Date: Jan 2002
Posts: 6,341
Quote:
Originally posted by ccwf
In Linux/Unix systems, deleting an in-use file deletes it from the directory it is in but not from the disk. Files are not really deleted until all references to them are removed; so as long as endpad keeps a reference to it (even via redirection, but not always with network mounts if you install a network filesystem on your TiVo), it will remain even though invisible when trying to list files using ls.

This behavior is very different from the DOS/Windows way of doing things.
You learn something every day.
sanderton is offline  
Old 10-13-2003, 03:57 PM   #128
ccwf
国際化 Member
 
ccwf's Avatar
 
Join Date: Dec 2001
Location: Malibu
Posts: 8,634
Quote:
Originally posted by sanderton
End padding takes priority, which just reflects the way I prefer to work. In practice, unless you set very large amounts of padding, it's rare to have an overlap. In fact I had to run endpad with 15 mins start and 15 mins end to force some to test the code!
I'm happy with that for now, too. (Even though mentioned splitting the difference above as an example, I actually don't think that would be a good idea.)

However, as a future enhancement, it might be nice to give priority to a half minute or less of start padding in case of a conflict because, at least in the U.S., there are a number of programmes that do start a few seconds early (needing just a tiny amount of start padding and not even a full minute).

As you wrote, the start/end-padding conflict situation shouldn't come up that often for most people, so this is just something to think about for the future.
__________________
ccwf

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

TiVo
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

中日韓
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
ccwf is offline  
Old 10-13-2003, 04:05 PM   #129
Dapper Dan
Gold Member
 
Join Date: Feb 2002
Location: Sussex, UK
Posts: 105
Quote:
Originally posted by sanderton
...I had thought rc.sysinit.author ran last of all on startup, but rc.net runs after it. endpad had a two minute pause in it, which it seems is long enough to bggr up the code in rc.net which configures TiVo to use the internet for guide data.

Apologies.
Is there any reason why you shouldn't change your rc.sysinit file so that the rc.sysinit.author line is at the very end ?
__________________
I used to be indecisive, but now I'm not so sure.
Dapper Dan is offline  
Old 10-13-2003, 04:08 PM   #130
ccwf
国際化 Member
 
ccwf's Avatar
 
Join Date: Dec 2001
Location: Malibu
Posts: 8,634
Quote:
Originally posted by ccwf
[low-level stuff about how deletion works]
The effect of in this situation is that it doesn't matter if you delete the file first and then stop endpad.tcl or vice versa.

Actually, since endpad.tcl is logging in append mode, I would just truncate the log file and leave endpad.tcl running instead of deleting the log file and stopping endpad.tcl. (You truncate by overwriting with a zero-length file. /dev/null is typically used for this purpose.)
__________________
ccwf

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

TiVo
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

中日韓
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
ccwf is offline  
Old 10-13-2003, 04:11 PM   #131
sanderton
TiVoer since 11/2000
 
Join Date: Jan 2002
Posts: 6,341
Why whenever you decide something is ready, does a really obvious bug crop up 2 mins later?

Version 1.2.1 is now on the front page.
sanderton is offline  
Old 10-13-2003, 04:18 PM   #132
Fozzie
Registered User
 
Fozzie's Avatar
 
Join Date: Sep 2001
Location: Alton, Hants, UK
Posts: 837
Quote:
Originally posted by sanderton
Why whenever you decide something is ready, does a really obvious bug crop up 2 mins later?
Doh! Which was?
Fozzie is offline  
Old 10-13-2003, 04:20 PM   #133
ccwf
国際化 Member
 
ccwf's Avatar
 
Join Date: Dec 2001
Location: Malibu
Posts: 8,634
The setting of nextrec still needs to loop until a non-suggestion is found. I know this scenario is unlikely (e.g., unwisely large end padding setting with a film short or Making Of show as a suggestion), but I think it's important to fix because it can actually result in endpad.tcl cancelling a real recording.
__________________
ccwf

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

TiVo
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

中日韓
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
ccwf is offline  
Old 10-13-2003, 04:31 PM   #134
sanderton
TiVoer since 11/2000
 
Join Date: Jan 2002
Posts: 6,341
Quote:
Originally posted by Fozzie
Doh! Which was?
TiVo doesn't store the end time of a recording, so you have to calculate it from various other settings, and there was one particular circumstance where I got the sum wrong, which meant that the start padding could back into the programme being recorded, making it the second recording fail.

I just watched it happen, and the mistake was so obvious I don't know how it sat there all this time.

Such is life.
sanderton is offline  
Old 10-13-2003, 04:34 PM   #135
sanderton
TiVoer since 11/2000
 
Join Date: Jan 2002
Posts: 6,341
Quote:
Originally posted by ccwf
The setting of nextrec still needs to loop until a non-suggestion is found. I know this scenario is unlikely (e.g., unwisely large end padding setting with a film short or Making Of show as a suggestion), but I think it's important to fix because it can actually result in endpad.tcl cancelling a real recording.
It's still on my things to do list (as is a whole bunch of other stuff) but it's so unlikely to happen in practice (you would have to have so much end padding set that it would be longer than the entire suggestion) and the code is made quite a lot more complex by it, that I decided to leave it until this version is completely stable and bug free before changing it.

I don't envisage people typically having more than 5 mins soft end padding set ( my settings are 1 min start and 2 mins end) - if I'm misjudging that perhaps people could set me straight?
sanderton is offline  
Old 10-13-2003, 04:47 PM   #136
Fozzie
Registered User
 
Fozzie's Avatar
 
Join Date: Sep 2001
Location: Alton, Hants, UK
Posts: 837
I use 1 min start and 4 mins end.

Sticking with your opening post about 'in for a penny, in for a pound' how about a Tivo Web module to remotely stop it and remotely start it; with configurable paramaters of course

(I'm just flapping about my one month trip away to SA at Xmas, checking endpad's log and finding it had stopped and then having no way of re-starting it!)
Fozzie is offline  
Old 10-13-2003, 04:50 PM   #137
sanderton
TiVoer since 11/2000
 
Join Date: Jan 2002
Posts: 6,341
ccwf posted a command that will automatically restart endpad should it crash earlier in the thread.
sanderton is offline  
Old 10-13-2003, 05:06 PM   #138
alunj
Registered User
 
Join Date: Oct 2000
Location: LLantwit Major
Posts: 85
1 min start 5 end here . So far so good!
It also got the end of silent witness so my SO is happy too!
dosnt like being killed tho, whish I had readthe file and discovered the
-stop option !! :-0
alunj is offline  
Old 10-13-2003, 05:09 PM   #139
ccwf
国際化 Member
 
ccwf's Avatar
 
Join Date: Dec 2001
Location: Malibu
Posts: 8,634
Quote:
Originally posted by sanderton
It's still on my things to do list (as is a whole bunch of other stuff) but it's so unlikely to happen in practice (you would have to have so much end padding set that it would be longer than the entire suggestion)
This is true, but it's worth at least a warning in the first post to tell people not to use very large values for the padding.

I'll post some sample code for the logic in a few minutes, but it could be way off since I'm not as familiar with the idiosyncrasies of the database.
__________________
ccwf

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

TiVo
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

中日韓
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
ccwf is offline  
Old 10-13-2003, 05:24 PM   #140
Adder
Registered User
 
Join Date: Oct 2002
Posts: 216
Quote:
Originally posted by sanderton
It's still on my things to do list (as is a whole bunch of other stuff) but it's so unlikely to happen in practice (you would have to have so much end padding set that it would be longer than the entire suggestion) and the code is made quite a lot more complex by it, that I decided to leave it until this version is completely stable and bug free before changing it.

I don't envisage people typically having more than 5 mins soft end padding set ( my settings are 1 min start and 2 mins end) - if I'm misjudging that perhaps people could set me straight?
How about having 15 minutes of end padding say on a program that finishes at 7pm

A suggestion that is 5 mins long at 7.05pm and a real program at 7.10pm for an hour?

You would lose the 7.10pm program would you not?

Also would end padding on a suggestion override start padding on a real recording?

Questions, questions...
__________________
6022 Tivo + 2 x 120GB Samsung SV1204H + CacheCard

VM TiVo now installed!
Adder is offline  
Old 10-13-2003, 05:36 PM   #141
ccwf
国際化 Member
 
ccwf's Avatar
 
Join Date: Dec 2001
Location: Malibu
Posts: 8,634
Here's some untested modified code that also tries to find the next non-suggestion:
Code:
RetryTransaction {
    set currec [mfs scan "/Recording/Active" -start "3:" -count 1]
    set nextrec [mfs scan "/Recording/Active" -start "4:" -count 1]

    set realrec 4
    while { 1 } {
	set nextrealrec [mfs scan "/Recording/Active" -start "${realrec}:" -count 1]
	scan [lindex [lindex $nextrealrec 0] 1] "%d:%d:%d:%d"\
	    nextrealrectype nextrealrecstartdate\
	    nextrealrecstarttime nextrealrecfsid

	if {[dbobj [db $db openid $nextrealrecfsid] get SelectionType] != 6} {
	    break
	}
	incr realrec
    }
}
The padding calculations would be switched to using the nextrealrec-based variables. The wake-up calculation would continue to use the nextrec-based variables.

Easier said than done, of course, and certainly less important than stability as stated above.
__________________
ccwf

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

TiVo
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

中日韓
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Last edited by ccwf : 10-13-2003 at 05:39 PM.
ccwf is offline  
Old 10-13-2003, 05:41 PM   #142
sanderton
TiVoer since 11/2000
 
Join Date: Jan 2002
Posts: 6,341
And you'd lose the padding of suggestions, which is an often requested feature.

I'll have more of a think about it.
sanderton is offline  
Old 10-13-2003, 05:43 PM   #143
sanderton
TiVoer since 11/2000
 
Join Date: Jan 2002
Posts: 6,341
Quote:
Originally posted by alunj
1 min start 5 end here . So far so good!
It also got the end of silent witness so my SO is happy too!
dosnt like being killed tho, whish I had readthe file and discovered the
-stop option !! :-0
No, its a tivosh process and they get very upset when you kill them. Nice animation though isn't it?
sanderton is offline  
Old 10-13-2003, 06:00 PM   #144
ccwf
国際化 Member
 
ccwf's Avatar
 
Join Date: Dec 2001
Location: Malibu
Posts: 8,634
Quote:
Originally posted by sanderton
And you'd lose the padding of suggestions, which is an often requested feature.

I'll have more of a think about it.
It shouldn't lose padding for suggestions, but you should indeed think about it before implementing.
__________________
ccwf

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

TiVo
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

中日韓
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
ccwf is offline  
Old 10-13-2003, 07:20 PM   #145
cinnamon_oil
Bleep & Booster
 
cinnamon_oil's Avatar
 
Join Date: Sep 2002
Posts: 99
Just tried 1.2 out - wowsa! It works! Found one little bug though; although it should (if I read the blurb right) allow values of 30 seconds and 90 seconds (i.e. endpad 0.5 1.5) it doesn't work; it appears to silently die if I try those values. According to the log it goes through one cycle and then dies before it starts the "polling every minute" bit.

Still haven't quite worked out what happens under certain circumstances though! Am I right in thinking that, with start and end padding, it would be

scheduled:suggestion -> suggestion gets dropped
scheduled:scheduled -> no padding, change on time
suggestion:scheduled -> suggestion gets dropped

If so, would it be possible to have a couple of options to set the behaviour in those circumstances? An option for suggestions, do that instead of dropping the suggestions the start time is pushed forward or the end time is pushed back (--preserve-suggestions?), and an option for scheduled so that the channel change time is pushed forward (--always-pad?). Personally I think the latter isn't a good choice, but I know some people have asked for it.

Actually, a third option just came to mind; if a scheduled recording follows a scheduled one then the padding is applied to the one that has priority in the SP list? With those options I reckon everyone can have the options that suit them.

Anyway - it works pretty darn good already in my opinion! Kudos all round!
cinnamon_oil is offline  
Old 10-14-2003, 03:41 AM   #146
LJ
Registered User
 
LJ's Avatar
 
Join Date: Nov 2001
Location: West Sussex, England
Posts: 786
Another option with the logfile could be to rotate it to 'Oendpad.log' once a day like the other logs. Something along these lines would rotate on the first run after midnight each day. It keeps the current log file if endpad is restarted:

Code:
### Add this definition

set Ologfile "/var/log/Oendpad.log"


### Change the "Open logfile" section to:

set logdate [clock format [file mtime "$logfile"] -format "%j"]

set logchan [open $logfile "a"]

puts $logchan "[clock format [clock seconds] -format $datestamp] : endpad.tcl log file, starting up"


### Add this to the main loop

if {$logdate != [clock format [clock seconds] -format "%j"] } {
   flush $logchan
   close $logchan

   catch {file copy -force $logfile $Ologfile}

   set logchan [open $logfile "a"]
   puts $logchan "[clock format [clock seconds] -format $datestamp] : endpad.tcl log file, log rotated"

   set logdate [clock format [clock seconds] -format "%j"]
}

__________________
Latest versions of my TiVoWeb modules: Now Playing with Folders and Sort; What's On; Show series conflicts; Showcase etc are
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
.
LJ is offline  
Old 10-14-2003, 04:59 AM   #147
sanderton
TiVoer since 11/2000
 
Join Date: Jan 2002
Posts: 6,341
Quote:
Originally posted by cinnamon_oil
Am I right in thinking that, with start and end padding, it would be

scheduled:suggestion -> suggestion gets dropped
scheduled:scheduled -> no padding, change on time
suggestion:scheduled -> suggestion gets dropped

Yes that's what it's supposed to do, but I need to tidy up the code which handles dealing with adjacent suggestions - you can't schedule suggestions so the testing has been quite limited so far, and I want to add more code to make absolutely certain it is doing what I want.

Quote:
Originally posted by cinnamon_oil
If so, would it be possible to have a couple of options to set the behaviour in those circumstances? An option for suggestions, do that instead of dropping the suggestions the start time is pushed forward or the end time is pushed back (--preserve-suggestions?), and an option for scheduled so that the channel change time is pushed forward (--always-pad?). Personally I think the latter isn't a good choice, but I know some people have asked for it.

Actually, a third option just came to mind; if a scheduled recording follows a scheduled one then the padding is applied to the one that has priority in the SP list? With those options I reckon everyone can have the options that suit them.
Options to force negative start padding to guarantee end padding (which is what I think you mean) are on the drawing board.
sanderton is offline  
Old 10-14-2003, 05:01 AM   #148
sanderton
TiVoer since 11/2000
 
Join Date: Jan 2002
Posts: 6,341
Quote:
Originally posted by LJ
Another option with the logfile could be to rotate it to 'Oendpad.log' once a day like the other logs. Something along these lines would rotate on the first run after midnight each day.
Ta, I'll add that in.
sanderton is offline  
Old 10-14-2003, 06:57 AM   #149
Edwards_sj
Registered User
 
Join Date: Nov 2002
Posts: 7
Jut trying out version 1.2.1 and I saw this in the log...

Tuesday 09:57:00 : Woken up
Tuesday 09:57:00 : Recording {Come Outside} on CBEEB now
Tuesday 09:57:00 : Recording Scheduled End Time: 09:59
Tuesday 09:57:00 : Next recording is Angel on SKYONE at 10:00
Tuesday 09:57:00 : Next end padding setting due 10:55
Tuesday 09:57:00 : Added 120 seconds start padding to Angel
Tuesday 09:57:00 : Next start padding setting due 10:55
Tuesday 09:57:00 : Next wake up will be 10:27

Both were suggestions.

It seems to have added 2 minutes to the beginning of Angel even though there wasn't room... the result was that angel didn't record...

Endpad was running with 2 minutes start and end padding.

Is this right?

Cheers

Steve
Edwards_sj is offline  
Old 10-14-2003, 07:05 AM   #150
sanderton
TiVoer since 11/2000
 
Join Date: Jan 2002
Posts: 6,341
No, it's not. I realised this morning that the code for adjacent suggestions needs changing as TiVo's default behaviour when there's a clash is the opposite way round to what I thought it was.

I will tidy it up and post a fix tonight.
sanderton is offline  
Closed Thread
Forum Jump




Thread Tools


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Advertisements

TiVo Community
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
vBulletin Skins by: Relivo Media

(C) 2013 Magenium Solutions - All Rights Reserved. No information may be posted elsewhere without written permission.
TiVo is a registered trademark of TiVo Inc. This site is not owned or operated by TiVo Inc.
All times are GMT -5. The time now is 01:56 AM.
OUR NETWORK: MyOpenRouter | TechLore | SansaCommunity | RoboCommunity | MediaSmart Home | Explore3DTV | Dijit Community | DVR Playground |