Skip to content
Permalink
Browse files

Fix a major scheduling performance regression.

Commit 38d9ba2 incorrectly included a change which bypassed the
ability to skip scheduling steps that did not change.  The result was
every change caused a much longer, full reschedule.  This commit fixes
that and performs the orginally intended change correctly.
  • Loading branch information...
gigem committed Oct 8, 2018
1 parent ce00204 commit 33e31a01baa84cdcc83e36d5a1c6544a661d2752
Showing with 11 additions and 8 deletions.
  1. +9 −4 mythtv/programs/mythbackend/mainserver.cpp
  2. +2 −4 mythtv/programs/mythbackend/services/dvr.cpp
@@ -3206,15 +3206,20 @@ void MainServer::DoHandleUndeleteRecording(
* \par RESCHEDULE_RECORDINGS
* Requests that all recordings after the current time be rescheduled.
*/
void MainServer::HandleRescheduleRecordings(const QStringList &/*request*/,
void MainServer::HandleRescheduleRecordings(const QStringList &request,
PlaybackSock *pbs)
{
ScheduledRecording::RescheduleMatch(0, 0, 0, QDateTime(),
"HandleRescheduleRecordings");
QStringList result;
if (m_sched)
{
m_sched->Reschedule(request);
result = QStringList(QString::number(1));
}
else
result = QStringList(QString::number(0));

if (pbs)
{
QStringList result = QStringList( QString::number(1) );
MythSocket *pbssock = pbs->getSocket();
if (pbssock)
SendResponse(pbssock, result);
@@ -408,10 +408,8 @@ bool Dvr::ReactivateRecording(int RecordedId)

bool Dvr::RescheduleRecordings(void)
{
QString cmd = QString("RESCHEDULE_RECORDINGS");
MythEvent me(cmd);

gCoreContext->dispatch(me);
ScheduledRecording::RescheduleMatch(0, 0, 0, QDateTime(),
"RescheduleRecordings");
return true;
}

0 comments on commit 33e31a0

Please sign in to comment.
You can’t perform that action at this time.