[mythtv-users] 'End late' ignored when recording LiveTV

Michael T. Dean mtdean at thirdcontact.com
Mon Jul 30 22:43:29 UTC 2012

On 07/30/2012 05:22 PM, Richard wrote:
> On 30/07/12 17:29, Michael T. Dean wrote:
>> On 07/27/2012 03:19 PM, Richard wrote:
>>> Hi,
>>> I noticed recently that if I toggle the recording status on a
>>> programme I'm watching via LiveTV, the recording often stops before
>>> the programme does because the 'End late' value was not applied.
>>> I did a bit of digging in the code and found this is done 
>>> intentionally:
>>> void TVRec::NotifySchedulerOfRecording(RecordingInfo *rec)
>>> {
>>> ...
>>>     // + remove DefaultEndOffset which would mismatch the live session
>>>     rec->GetRecordingRule()->m_endOffset = 0;
>>> ...
>>> }
>>> The comment for NotifySchedulerOfRecording seems to indicate that this
>>> goes against the purpose of this method:
>>> "In this case the scheduler needs to know about the recording so it
>>>  can properly take overrecord into account, and to properly
>>>  reschedule other recordings around to avoid this recording."
>>> Normally I'd open a ticket but since it's been done intentionally I
>>> thought I'd check here to see if anyone can explain why.
>>> I don't need this feature very often but there's not much point using
>>> it at all if there's a good chance it's going to cause me to miss the
>>> end of the programme.
>> So, what you're saying is, "the setting which specifies a default value
>> for the end late when creating a new recording rule isn't applied when
>> I'm watching Live TV and I hit R to record the rest of the show"?
> Hi Mike,
> No, what I'm saying is that the setting *is* being applied but then it 
> is being *explicitly* deactivated in this case, and I don't understand 
> the reasoning.
> The RecordingRule class automatically sets the end offset member in 
> its constructor.  The method I mentioned in the TVRec class then 
> explicitly sets it to zero.

AIUI, there are 2 "recordings" involved, here.  When you're watching 
Live TV, the recording /must/ ignore any end late--otherwise, it will 
try to overrecord the show when it ends before switching to the new 
show, which will completely break the Live TV chain (which requires 
non-overlapping recordings).  Therefore, default end late is removed for 
Live TV.  However, when you change that Live TV "virtual recording rule" 
recording to a "normal" recording rule, we have to look up the recording 
based on how it was created originally--as a 
Live-TV-without-default-end-late rule--so we can change it to the proper 
recording group.

>> The setting is meant to pre-populate the value in the recording rule
>> editor and nothing more.  If you want to use that value, create
>> recording rules.  IMHO, the benefit to be gained from adding code to
>> send a recording rule update after converting a Live TV recording to a
>> "normal" recording by hitting R when watching Live TV to retro-actively
>> apply an end late isn't worth the benefit.  Not to mention the fact that
>> hitting R during Live TV doesn't even work properly, right now--meaning
>> any time spent on that code would be better spent fixing the brokenness.
> What else is broken?

There are tons of reports from users that shows aren't properly moved 
from the Live TV recording group; or that the group is changed properly, 
but as soon as they exit Live TV, the recording ends; or that changing 
channel after hitting R ends or breaks or records the wrong show for the 
recording or ...

Feel free to browse:  http://code.mythtv.org/trac/report/1

(and if you can figure out any of them, and/or fix issues, and/or help 
users figure out mistakes, we'd very much appreciate the help)

>   Apart from the issue I mentioned, I've not noticed any other issues 
> but it would be nice to know before they bite me (or worse, the wife :) )
> The time required to "fix" it (assuming it's broken, which is why I 
> was asking the in first place) should be less than a minute (basically 
> the time it takes to open tv_rec.cpp, search for the line above and 
> delete it).

I think if you fix it that way, you'll break Live TV.  TTBOMK, we'd need 
to implement the change to the rule the same way we extend recordings in 
progress.  I may be wrong.  Feel free to prove me wrong with a 
working/well-tested patch.  I'll admit that I haven't traced all the 
code, so my understanding may be completely wrong.  I'd assume if it 
were as simple as "delete that line that was added explicitly," that 
line would never have been added--because, just as you're saying, it 
makes no sense to explicitly ignore a configured setting unless we have 
to.  (Now, there are many areas where we unintentionally ignore a 
configured setting--mainly because there are so many settings that most 
devs don't remember that something /is/ a setting--but in this case it's 
a line added specifically to ignore that setting.)

>> Now it is possible--and not too difficult--for you to manually extend
>> the recording-in-progress that was created when you hit R (the same way
>> you do when you extend any other already-in-progress recording--left as
> As a work-around, yes, you can.  But that's a lot of keypresses (come 
> out of LiveTV, down to 'Schedule Recordings', OK, down to 'Recording 
> rules', OK, scroll, scroll, scroll until you find the new rule, OK, 
> down to 'Scheduling Options', OK, down to 'End offset', right a couple 
> of times, down to 'Done', OK, down to 'Save', OK...
> Interestingly the 'Start early' setting is correctly set (because 
> RecordingRule automatically set it in its constructor).

FWIW, you can do it in Watch Recordings with Schedule Options or in 
MythWeb--both of which are much easier than using Manage 
Recordings|Schedule Recordings|Recording Rules.

>> would be way more typing than I care to do).  And, since you won't be
>> creating a lot of recording rules this way (after all, the fact that
>> you're starting the recording from Live TV means that you likely missed
>> some portion of the beginning of the show before you stumbled upon an
>> interesting show), doing so shouldn't be too much work.  (In other
>> words, the point of a DVR is to set it to record anything and everything
>> you might possibly want to watch so that you always have something more
>> interesting to watch than whatever is currently airing--along with its
>> commercials and such--and you can then delete (or let it expire) the
>> cruft as you get more and more recordings of better shows to watch. And,
> I understand the arguments made against LiveTV but I don't accept them 
> as always valid world-wide.  I absolutely agree that watching 
> programmes stripped of adverts and the rest (or at least pre-recorded 
> so that they can be jumped over quickly) is much more pleasurable.  
> I've wanted to put my foot through the screen when I've been in the US 
> and it felt like the TV station couldn't show more than three or four 
> scenes before they had to go to yet another ad-break.  Other countries 
> have fewer ad-breaks per hour but then collect them into such large 
> chunks that they re-show the last scene again after the break because 
> the viewer will probably have already forgotten was happening.
> I've noticed myself how I automatically reach for the remote control 
> to skip stuff and then realise I can't because I'm watching live.  It 
> doesn't happen too often because I usually watch stuff that's already 
> been recorded.  However, there are times when I do want to watch live 
> TV, and not every TV station in the world has adverts.
> If I happen to know/see that a programme is on now that I'd like to 
> watch, where's the problem?
> The particular instance I had the other evening was that I'd been 
> watching a programme (without adverts!) and the following programme 
> sounded interesting so I started watching it too.  It was starting to 
> get late and I needed to go to bed so I just pressed 'R' to record the 
> rest of it but then found the end was missing when I came to watch it. 
> The schedules are generally fairly good but it's certainly possible 
> that there's maybe a minute or so of 'mismatch' from time to time 
> (which is presumably why the setting is there).  I certainly wouldn't 
> trust it down to the second.

I'm just saying it should be the exception, not the "rule", that you'll 
create recording rules from Live TV, so going to Watch Recordings (which 
I keep as a jump point on my remote), select the recording at top of the 
list, MENU|Recording Options|Edit Recording Schedule to extend the 
recording shouldn't be too much trouble.

>> BTW, I mean /anything/ and /everything/--including news and sports and
>> ...  http://www.gossamer-threads.com/lists/mythtv/users/387302#387302 )
> I get that too, but there are some programmes I just couldn't create a 
> rule for (e.g. one-offs starring no-one I've ever heard of) but I may 
> still be interested in.  Maybe some sort of bayesian algorithm or the 
> like could be used but that sort of rule doesn't exist yet and would 
> also depend heavily on how much metadata is available.
> In most cases you could probably argue that these programmes probably 
> aren't *that* important to me and you'd almost certainly be right but 
> if I've started watching something, I usually want to finish watching 
> it too.

And you think you're more likely to find these programs efficiently by 
tuning in whatever is currently airing and channel surfing than by 
looking at the guide and hitting R (one or more times to create the rule 
type you want)?


More information about the mythtv-users mailing list