[mythtv] More scheduling scheduler

David Engel gigem at comcast.net
Tue Apr 18 22:51:33 UTC 2006


On Tue, Apr 18, 2006 at 10:45:02PM +1000, Paul Andreassen wrote:
> Patch for softpad branch.

Thanks.

> @@ -186,7 +186,7 @@ static bool comp_redundant(ProgramInfo *
>  
>      int asoft = (a->softstart != 0) + (a->softend != 0);
>      int bsoft = (b->softstart != 0) + (b->softend != 0);
> -    return asoft <= bsoft;
> +    return asoft < bsoft;
>  }

This shouldn't make any difference whatsoever.  Did you see one?

> @@ -847,7 +848,7 @@ void Scheduler::SchedNewRecords(void)
>              }
>              else
>              {
> -                retrylist.push_front(p);
> +                retrylist.push_back(p);
>                  PrintRec(p, "  #");
>                  PrintRec(*k, "     !");

I've explained why this code is the way it is.  It isn't changing so
please quit including this change.

> @@ -560,6 +560,10 @@ void ProgramInfo::ToMap(QMap<QString, QS
>  
>      progMap["time"] = timeNow.time().toString(timeFormat);
>  
> +    progMap["timebuffer"] = QString("(-%1 +%2)")
> +                            .arg((recstartts.secsTo(startts)+30)/60)
> +                            .arg((endts.secTo(recendts)+30)/60);
> +
>      MSqlQuery query(MSqlQuery::InitCon());

Please make this conditional in some way.  IOW, if there's no extra
padding, hard or soft, don't display anything extra.

> @@ -392,7 +392,10 @@ void TVMenuCallback(void *data, QString 
>      {
>          GeneralSettings settings;
>          if (settings.exec())
> +        {
> +            sleep(1);   // give mysql a chance to update
>              ScheduledRecording::signalChange(0);
> +        }
>      } 
>      else if (sel == "settings maingeneral") 

There is an interaction with the settings cache I forgot about.  I'll
fix this properly later.

> @@ -479,6 +479,7 @@ void ViewScheduled::updateInfo(QPainter 
>          if (p)
>          {
>              p->ToMap(infoMap);
> +            infoMap["timedate"]+=" "+infoMap["timebuffer"]
>              container->ClearAllText();
>              container->SetText(infoMap);
>          }

This should be handled differently.  Either the "timebuffer" part
should be conditionally added to "timedate" in PI::ToMap or it should
be kept completely separate and left to the theme to decide where and
how to display it.

Right now, I don't feel strongly either way, so hopefully others that
do will speak up.

On Tue, Apr 18, 2006 at 03:49:45PM +1000, Max Barry wrote:
> BUG #1: Still there. Altering the softpad settings triggers some kind of
> reschedule, but it doesn't work properly. That is, the backend log shows

See above.

> BUG #2: Still there. Soft pads are still dropped when they should be
> retained.

I believe I alread said that will an extra pass after SchedNewRecords
to maximize padding.  I'm not planning on writing it so someone else
is going to have to do it.

> BUG #3: Still there. A higher-priority show will conflict other shows
> around it in order to preserve the soft padding. I checked
> Utilities/Setup -> Setup -> TV Settings -> Recording Priorities -> Set
> Recording Priorities -> Reschedule Higher Priorities, as requested, and
> this was set to off. Also all the numbers were 0.

Perhaps I'm misunderstanding, but if you're saying soft pads never get
dropped if Reschedule Higher Priorities isn't set, then yes, that is
expected.  The approach under consideration has to work that way by
design.  I'll disable soft padding if this option isn't set.

David
-- 
David Engel
gigem at comcast.net


More information about the mythtv-dev mailing list