[mythtv] More scheduling scheduler

David Engel gigem at comcast.net
Fri Apr 21 19:16:06 UTC 2006


On Thu, Apr 20, 2006 at 11:28:40PM +1000, Paul Andreassen wrote:
> @@ -865,6 +866,50 @@ void Scheduler::SchedNewRecords(void)
>  
>  void Scheduler::MoveHigherRecords(void)
>  {
> +    int softStart = gContext->GetNumSetting("SchedSoftStart",0);
> +    int softEnd = gContext->GetNumSetting("SchedSoftEnd",0);
> +
> +    if (softStart != 0 || softEnd != 0)
> +    {
> ...

This will have adverse affects on TryAnotherShowing.  I'm considering
a differenet approach that will also be beneficial without soft
padding.  It might take me a few days before I can get to it, though.

> Index: softpad/libs/libmythtv/programinfo.cpp
> ===================================================================
> --- softpad.orig/libs/libmythtv/programinfo.cpp	2006-04-18 22:29:31.177257768 +1000
> +++ softpad/libs/libmythtv/programinfo.cpp	2006-04-20 23:26:21.912554912 +1000
> @@ -560,6 +560,13 @@ void ProgramInfo::ToMap(QMap<QString, QS
>  
>      progMap["time"] = timeNow.time().toString(timeFormat);
>  
> +    int earily = (recstartts.secsTo(startts)+30)/60;
> +    int late = (recendts.secsTo(endts)+30)/60;
> +    if (earily == 0 && late == 0)
> +        progMap["timebuffer"] = "";
> +    else
> +        progMap["timebuffer"] = QString("(%1 %2)").arg(earily).arg(late);

I added separate map entries for startoffset and endoffset.  I also
conditionally appended that information to the end of the timedate
entry.

FWIW, I don't really like how the timedate entry is a hard coded
combination of other entries.  The combination can be done in the
theme with greater flexibility.  I might address this later in trunk.

David
-- 
David Engel
gigem at comcast.net


More information about the mythtv-dev mailing list